diff options
Diffstat (limited to 'sys-kernel/linux/linux-4.10.13.ebuild')
-rw-r--r-- | sys-kernel/linux/linux-4.10.13.ebuild | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys-kernel/linux/linux-4.10.13.ebuild b/sys-kernel/linux/linux-4.10.13.ebuild index c1c88a8..b299aa3 100644 --- a/sys-kernel/linux/linux-4.10.13.ebuild +++ b/sys-kernel/linux/linux-4.10.13.ebuild @@ -34,7 +34,12 @@ src_install() { pkg_postinst() { # Add label to syslinux config if there is non yet if ! grep -q "^LABEL gentoo-${PV}$" /boot/syslinux/syslinux.cfg; then - sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo${PV}\n\tLINUX ../bzlinux-${PV}\n\tAPPEND root=/dev/sda2 rootflags=subvol=@gentoo\n\tINITRD ../initramfs-gentoo\n" /boot/syslinux/syslinux.cfg || eerror "Adding label to syslinux configuration failed!" + ARGS="$(grep -E "^# ARGS: " /boot/syslinux/syslinux.cfg | sed 's/^# ARGS: //')" + if [ -n "$ARGS" ]; then + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo${PV}\n\tLINUX ../bzlinux-${PV}\n\tAPPEND ${ARGS}\n\tINITRD ../initramfs-gentoo\n" /boot/syslinux/syslinux.cfg || eerror "Adding label to syslinux configuration failed!" + else + eerror "Adding label to syslinux configuration failed as there are no arguments" + fi fi } |