diff options
Diffstat (limited to 'sys-kernel/linux')
-rw-r--r-- | sys-kernel/linux/linux-4.13.13-r2.ebuild (renamed from sys-kernel/linux/linux-4.13.13-r1.ebuild) | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys-kernel/linux/linux-4.13.13-r1.ebuild b/sys-kernel/linux/linux-4.13.13-r2.ebuild index e931a39..6d7bb59 100644 --- a/sys-kernel/linux/linux-4.13.13-r1.ebuild +++ b/sys-kernel/linux/linux-4.13.13-r2.ebuild @@ -14,7 +14,7 @@ S="${WORKDIR}/linux-stable-${VER}" LICENSE="GPLv2" SLOT="${PV}" KEYWORDS="amd64 ~x86" -IUSE="virt" +IUSE="virt +initramfs" DEPEND="sys-devel/bc" @@ -55,7 +55,7 @@ sysfile() { SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" PFIX="../../.." elif [ -f "${ROOT}/boot/extlinux.cfg" ]; then - SYSLINUX="${ROOT}/boot/extlinux.cfg" + SYSLINUX="${ROOT}/boot/extlinux.conf" PFIX="." else eerror "Can't locate syslinux configuration!" @@ -66,10 +66,13 @@ pkg_postinst() { sysfile # Add label to syslinux config if there is non yet if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then + if $(use initramfs); then + INITRD="\tINITRD ${PFIX}/initramfs-gentoo\n" + fi ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" if [ -n "$ARGS" ]; then - sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" - sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n$INITRD" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" + sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n$INITRD" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" else eerror "Adding label to syslinux configuration failed as there are no arguments" fi |