summaryrefslogtreecommitdiff
path: root/sys-kernel/linux
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-11-17 22:03:18 +0100
committerKarel Kočí <cynerd@email.cz>2017-11-17 22:03:18 +0100
commitf066121b5722fb03bd87519b1c32ecee27e08fc6 (patch)
tree8ab678e208645d2a2a5804080e5f0c3992d8a617 /sys-kernel/linux
parentdfbe777ef7c2b285e7e2b8c8f1145849baab89c2 (diff)
downloadgentoo-personal-overlay-f066121b5722fb03bd87519b1c32ecee27e08fc6.tar.gz
gentoo-personal-overlay-f066121b5722fb03bd87519b1c32ecee27e08fc6.tar.bz2
gentoo-personal-overlay-f066121b5722fb03bd87519b1c32ecee27e08fc6.zip
Add posibility to have no initramfs to linux
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