diff options
author | Karel Kočí <cynerd@email.cz> | 2019-01-13 17:15:42 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2019-01-13 17:15:42 +0100 |
commit | f0481bc0867e2815351843d1477661067b97cea7 (patch) | |
tree | d1db5e4bec80ddd4d0e2fab23a05d2d111a171aa /sys-kernel/linux/linux-4.19.13-r1.ebuild | |
parent | 759e4de856444ae3483697b0d2139fbad3395c45 (diff) | |
download | gentoo-personal-overlay-f0481bc0867e2815351843d1477661067b97cea7.tar.gz gentoo-personal-overlay-f0481bc0867e2815351843d1477661067b97cea7.tar.bz2 gentoo-personal-overlay-f0481bc0867e2815351843d1477661067b97cea7.zip |
sys-kernel/linux: Drop relative paths
We can use absolute path from boot partition instead. This simplifies
code and introduces less variation between machines.
Diffstat (limited to 'sys-kernel/linux/linux-4.19.13-r1.ebuild')
-rw-r--r-- | sys-kernel/linux/linux-4.19.13-r1.ebuild | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys-kernel/linux/linux-4.19.13-r1.ebuild b/sys-kernel/linux/linux-4.19.13-r1.ebuild index 3f27472..1c1c58c 100644 --- a/sys-kernel/linux/linux-4.19.13-r1.ebuild +++ b/sys-kernel/linux/linux-4.19.13-r1.ebuild @@ -53,13 +53,10 @@ src_link() { sysfile() { if [ -f "${ROOT}/boot/syslinux/syslinux.cfg" ]; then SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" - PFIX=".." elif [ -f "${ROOT}/boot/EFI/BOOT/syslinux.cfg" ]; then SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" - PFIX="../../.." elif [ -f "${ROOT}/boot/extlinux.conf" ]; then SYSLINUX="${ROOT}/boot/extlinux.conf" - PFIX="." else eerror "Can't locate syslinux configuration!" fi @@ -71,15 +68,15 @@ pkg_postinst() { if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then if $(use initramfs); then if $(use ucode); then - INITRD="\tINITRD ${PFIX}/ucode.cpio,${PFIX}/initramfs-gentoo\n" + INITRD="\tINITRD /ucode.cpio,/initramfs-gentoo\n" else - INITRD="\tINITRD ${PFIX}/initramfs-gentoo\n" + INITRD="\tINITRD /initramfs-gentoo\n" fi 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$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!" + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX /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 /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 |