]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(rescue): make rescue always no-hostonly
authorJo Zzsi <jozzsicsataban@gmail.com>
Wed, 21 Aug 2024 23:20:43 +0000 (19:20 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 19 Sep 2024 12:42:35 +0000 (08:42 -0400)
Currently the rescue image is only set to no-hostonly if it is
generated via dracut-rescue.install. Make the rescue image
generation more predictable and consistent by setting no-hostonly
right in the rescue config.

dracut.conf.d/50-rescue.conf.example [deleted file]
dracut.conf.d/rescue/50-rescue.conf [new file with mode: 0644]
install.d/51-dracut-rescue.install

diff --git a/dracut.conf.d/50-rescue.conf.example b/dracut.conf.d/50-rescue.conf.example
deleted file mode 100644 (file)
index 6d6a170..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dracut_rescue_image="yes"
diff --git a/dracut.conf.d/rescue/50-rescue.conf b/dracut.conf.d/rescue/50-rescue.conf
new file mode 100644 (file)
index 0000000..943e56c
--- /dev/null
@@ -0,0 +1,4 @@
+dracut_rescue_image="yes"
+hostonly="no"
+add_dracutmodules+=" rescue "
+uefi="no"
index 25f75557a40511b88e4fb2cc8464915bff621d68..e04414e1f0053c26b242063a97f4fb2654591237 100755 (executable)
@@ -131,8 +131,8 @@ case "$COMMAND" in
 
         if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
             # shellcheck disable=SC2046
-            dracut -f --no-hostonly --no-uefi \
-                -a "rescue" \
+            dracut -f \
+                --add-confdir rescue \
                 $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
                 --kver "$KERNEL_VERSION" \
                 "$BOOT_DIR_ABS/$INITRD"