diff options
author | Karel Kočí <cynerd@email.cz> | 2017-05-01 13:01:04 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-05-01 13:01:04 +0200 |
commit | f892939039073825f0917198a7972f57b85f2112 (patch) | |
tree | ebc9ecfa6b110c3a892320ea8753aa49d8d0aa58 /sys-kernel/linux/linux-4.10.13.ebuild | |
parent | ea1fdbbe320aaec360df6300118e3918e9b768c1 (diff) | |
download | gentoo-personal-overlay-f892939039073825f0917198a7972f57b85f2112.tar.gz gentoo-personal-overlay-f892939039073825f0917198a7972f57b85f2112.tar.bz2 gentoo-personal-overlay-f892939039073825f0917198a7972f57b85f2112.zip |
linux: run postinst only once of it was already added
Diffstat (limited to 'sys-kernel/linux/linux-4.10.13.ebuild')
-rw-r--r-- | sys-kernel/linux/linux-4.10.13.ebuild | 6 |
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() { |