]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - 50-dracut.install
systemd: install systemd-tty-ask-password-agent systemd-ask-password
[thirdparty/dracut.git] / 50-dracut.install
index 64e3549f2992890b81720bd4f0142c9c3a723a02..7ea5e170e60877e646bef8cc3736072aa2f72681 100755 (executable)
@@ -35,10 +35,14 @@ case "$COMMAND" in
             read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
         elif [[ -f /usr/lib/kernel/cmdline ]]; then
             read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
-        fi
+        else
+            declare -a BOOT_OPTIONS
 
-        if ! [[ ${BOOT_OPTIONS[*]} ]]; then
-            read -r -d '' -a BOOT_OPTIONS < /proc/cmdline
+            read -r -d '' -a line < /proc/cmdline
+            for i in "${line[@]}"; do
+                [[ "${i#initrd=*}" != "$i" ]] && continue
+                BOOT_OPTIONS+=("$i")
+            done
         fi
 
         unset noimageifnotneeded
@@ -49,7 +53,7 @@ case "$COMMAND" in
                 break
             fi
         done
-       dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
+       dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
         ret=$?
        ;;
     remove)