]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(base): wait_for_dev quote shell variables
authorHarald Hoyer <harald@redhat.com>
Mon, 8 Mar 2021 09:14:36 +0000 (10:14 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 10 Mar 2021 18:31:19 +0000 (19:31 +0100)
modules.d/99base/dracut-lib.sh

index b9be2b175cfad5d03c0621f80f737cc2eb0933a0..0a53eb8b8f4923d8f53edf95d86920a66b2277ff 100755 (executable)
@@ -908,11 +908,11 @@ wait_for_dev()
 
     [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
 
-    printf '[ -e "%s" ]\n' $1 \
+    printf '[ -e "%s" ]\n' "$1" \
         >> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh"
     {
-        printf '[ -e "%s" ] || ' $1
-        printf 'warn "\"%s\" does not exist"\n' $1
+        printf '[ -e "%s" ] || ' "$1"
+        printf 'warn "\"%s\" does not exist"\n' "$1"
     } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
 
     set_systemd_timeout_for_dev $_noreload $1