]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat(cli): add --no-uefi option
authorVladius25 <vkorol2509@icloud.com>
Wed, 13 Jan 2021 11:32:13 +0000 (16:32 +0500)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 18 Jan 2021 08:30:00 +0000 (08:30 +0000)
To be able to turn off UEFI mode, when it's enabled in config.

dracut.8.asc
dracut.sh

index 7236ee6a0e24723f86a6cb1498e8580d92d87c12..ab7d40e4d5ca335f8ad3ecf5db543e3b637dc624 100644 (file)
@@ -510,6 +510,9 @@ will not be able to boot.
     The <BUILD_ID> is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists
     _/etc/os-release_ and is left out, if BUILD_ID is non-existant or empty.
 
+**--no-uefi**::
+    Disables UEFI mode.
+
 **--no-machineid**::
     affects the default output filename of **--uefi** and will discard the <MACHINE_ID>
     part.
index 0f464839703d29cadb98357795cb37aa127facde..e59e76ea46eb90005740422f765724e6b880e4bd 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -237,6 +237,7 @@ Creates initial ramdisk images for preloading modules
   --loginstall [DIR]    Log all files installed from the host to [DIR]
   --uefi                Create an UEFI executable with the kernel cmdline and
                         kernel combined
+  --no-uefi             Disables UEFI mode
   --uefi-stub [FILE]    Use the UEFI stub [FILE] to create an UEFI executable
   --uefi-splash-image [FILE]
                         Use [FILE] as a splash image when creating an UEFI
@@ -421,6 +422,7 @@ rearrange_params()
         --long no-reproducible \
         --long loginstall: \
         --long uefi \
+        --long no-uefi \
         --long uefi-stub: \
         --long uefi-splash-image: \
         --long kernel-image: \
@@ -622,7 +624,8 @@ while :; do
         --noimageifnotneeded) noimageifnotneeded="yes";;
         --reproducible) reproducible_l="yes";;
         --no-reproducible) reproducible_l="no";;
-        --uefi)        uefi="yes";;
+        --uefi)        uefi_l="yes";;
+        --no-uefi)     uefi_l="no";;
         --uefi-stub)
                        uefi_stub_l="$2";               PARMS_TO_STORE+=" '$2'"; shift;;
         --uefi-splash-image)
@@ -809,6 +812,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
 [[ $logfile_l ]] && logfile="$logfile_l"
 [[ $reproducible_l ]] && reproducible="$reproducible_l"
 [[ $loginstall_l ]] && loginstall="$loginstall_l"
+[[ $uefi_l ]] && uefi=$uefi_l
 [[ $uefi_stub_l ]] && uefi_stub="$uefi_stub_l"
 [[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
 [[ $kernel_image_l ]] && kernel_image="$kernel_image_l"