Commit 8fded4af authored by Anton Midyukov's avatar Anton Midyukov

build-vm: add FEATURES and MODULES_TRY_ADD from /etc/initrd.mk

Variables in cmdline override variables from /etc/initrd.mk See also: https://lists.altlinux.org/pipermail/make-initrd/2021-September/000533.html
parent 76f5cd1c
......@@ -19,6 +19,14 @@ done
cd /boot
VM_INITRDMODULES="$GLOBAL_VM_INITRDMODULES"
VM_INITRDMODULES+=" $(grep '^MODULES_TRY_ADD +=' /etc/initrd.mk |
sed 's/MODULES_TRY_ADD +=//g' | tr "\n" " " )"
VM_INITRDFEATURES="$GLOBAL_VM_INITRDFEATURES"
VM_INITRDFEATURES+=" $(grep '^FEATURES +=' /etc/initrd.mk |
sed 's/FEATURES +=//g' | tr "\n" " " )"
if [ -n "$GLOBAL_VM_INITRDFEATURES" ]; then
for INITRDFEATURE in $GLOBAL_VM_INITRDFEATURES; do
echo "FEATURES += $INITRDFEATURE" >> /etc/initrd.mk
......@@ -27,8 +35,8 @@ fi
for KVER in $kver; do
make-initrd -N -v -k "$KVER" AUTODETECT= \
FEATURES+="add-modules compress cleanup kbd rdshell rootfs $GLOBAL_VM_INITRDFEATURES" \
MODULES_TRY_ADD+="$GLOBAL_VM_INITRDMODULES" \
FEATURES+="add-modules compress cleanup kbd rdshell rootfs $VM_INITRDFEATURES" \
MODULES_TRY_ADD+="$VM_INITRDMODULES" \
|| { echo "** Error: make-initrd failed" >&2; exit 1; }
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment