summaryrefslogtreecommitdiff
path: root/sys-kernel/linux/linux-4.10.13.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/linux/linux-4.10.13.ebuild')
-rw-r--r--sys-kernel/linux/linux-4.10.13.ebuild6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys-kernel/linux/linux-4.10.13.ebuild b/sys-kernel/linux/linux-4.10.13.ebuild
index ad38a3f..f9d648b 100644
--- a/sys-kernel/linux/linux-4.10.13.ebuild
+++ b/sys-kernel/linux/linux-4.10.13.ebuild
@@ -32,8 +32,10 @@ src_install() {
}
src_postinst() {
- # Add label to syslinux config
- 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!"
+ # 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!"
+ fi
}
src_prerm() {