]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-init.sh: fix instmods with zero input
authorHarald Hoyer <harald@redhat.com>
Thu, 5 Jul 2018 10:27:33 +0000 (12:27 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 5 Jul 2018 11:39:46 +0000 (13:39 +0200)
instmods < /dev/null

should not error

dracut-init.sh

index 9891836adb0e30f16bf6bd8374cd0d92f6479e1e..50d23e2d110dd1f220eb134e7a5cb5adf3211277 100644 (file)
@@ -993,6 +993,10 @@ instmods() {
         set -- "${args[@]}"
     fi
 
+    if (($# == 0)); then
+        return 0
+    fi
+
     $DRACUT_INSTALL \
         ${initdir:+-D "$initdir"} \
         ${loginstall:+-L "$loginstall"} \