diff options
author | Karel Kočí <cynerd@email.cz> | 2018-03-20 23:49:36 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-03-20 23:49:36 +0100 |
commit | 2de5dcbdbd6e06790d733302993a06af224ff77f (patch) | |
tree | d8917e5fd654fa119c2599a7fd9e1bf22bc7ec96 /sys-kernel | |
parent | da0b26a77ff60ba2b899b6d76a454265cf0fa7bd (diff) | |
download | gentoo-personal-overlay-2de5dcbdbd6e06790d733302993a06af224ff77f.tar.gz gentoo-personal-overlay-2de5dcbdbd6e06790d733302993a06af224ff77f.tar.bz2 gentoo-personal-overlay-2de5dcbdbd6e06790d733302993a06af224ff77f.zip |
Use dracut instead of myinitramfs
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/linux/linux-4.14.27-r1.ebuild (renamed from sys-kernel/linux/linux-4.14.26-r1.ebuild) | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys-kernel/linux/linux-4.14.26-r1.ebuild b/sys-kernel/linux/linux-4.14.27-r1.ebuild index 3110217..7e6dd73 100644 --- a/sys-kernel/linux/linux-4.14.26-r1.ebuild +++ b/sys-kernel/linux/linux-4.14.27-r1.ebuild @@ -18,7 +18,8 @@ IUSE="virt +initramfs" DEPEND=" sys-devel/bc - dev-libs/elfutils" + dev-libs/elfutils + initramfs? ( dracut )" src_configure() { # Fix ARCH variable @@ -65,11 +66,19 @@ sysfile() { } pkg_postinst() { - sysfile + # Generate initramfs + if $(use initramfs); then + einfo "Generating initramfs" + dracut \ + -m "dash i18n rootfs-block terminfo udev-rules base fs-lib img-lib dm btrfs crypt" \ + --force "/boot/initramfs-${PV}" "${PV}" + fi + # Add label to syslinux config if there is non yet + sysfile if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then if $(use initramfs); then - INITRD="\tINITRD ${PFIX}/initramfs-gentoo\n" + INITRD="\tINITRD ${PFIX}/initramfs-${PV}\n" fi ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" if [ -n "$ARGS" ]; then @@ -79,12 +88,13 @@ pkg_postinst() { eerror "Adding label to syslinux configuration failed as there are no arguments" fi fi + src_link } pkg_prerm() { - sysfile # Remove label from syslinux config + sysfile sed -i "/^LABEL gentoo-${PV}\(\|-recovery\)$/,/^$/d" "${SYSLINUX}" || eerror "Removing label from syslinux fonfiguration failed!" } |