]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut-init.sh): add missing hostonly code in the inst_multiple function
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Tue, 16 Aug 2022 06:23:19 +0000 (08:23 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 29 Sep 2022 05:41:17 +0000 (05:41 +0000)
It seems that commit https://github.com/dracutdevs/dracut/commit/4ef45f13 forgot
to add the code to handle the hostonly parameter in the inst_multiple function.

dracut-init.sh

index 4ec600fb047955a37970617e05c4a537dede0902..6ef3fc8bb205e6b6b9b1c873a3ada419bad15271 100755 (executable)
@@ -271,8 +271,12 @@ inst_symlink() {
 }
 
 inst_multiple() {
-    local _ret
-    if "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
+    local _ret _hostonly_install
+    if [[ $1 == "-H" ]]; then
+        _hostonly_install="-H"
+        shift
+    fi
+    if "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
         return 0
     else
         _ret=$?