]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(cifs): shellcheck for modules.d/95cifs
authorHarald Hoyer <harald@redhat.com>
Fri, 26 Mar 2021 09:29:24 +0000 (10:29 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 30 Mar 2021 01:39:47 +0000 (03:39 +0200)
modules.d/95cifs/.shchkdir [new file with mode: 0644]
modules.d/95cifs/cifs-lib.sh
modules.d/95cifs/parse-cifsroot.sh

diff --git a/modules.d/95cifs/.shchkdir b/modules.d/95cifs/.shchkdir
new file mode 100644 (file)
index 0000000..e69de29
index 304fb4dc1c26e5c668b5734f04a8c3f3e6b3a2fa..b996b41b6575e141ea1c5adeb11d7a93a2c78b5e 100755 (executable)
@@ -25,11 +25,14 @@ cifs_to_var() {
         cifsuser=$(getarg cifsuser)
     fi
 
+    # shellcheck disable=SC2034
     path=${server#*/}
+    # shellcheck disable=SC2034
     server=${server%/*}
 
     if [ ! "$cifsuser" -o ! "$cifspass" ]; then
         die "For CIFS support you need to specify a cifsuser and cifspass either in the cifsuser and cifspass commandline parameters or in the root= CIFS URL."
     fi
+    # shellcheck disable=SC2034
     options="user=$cifsuser,pass=$cifspass,$(getarg rootflags=)"
 }
index 5315e45c8a266fa4dce4f878ddd1f9ebd38d29fa..b88bef48958c096d5cfa33e3f744f18ea540af01 100755 (executable)
@@ -35,14 +35,17 @@ fi
 [ "${netroot%%:*}" = "cifs" ] || return
 
 # Check required arguments
-cifs_to_var $netroot
+cifs_to_var "$netroot"
 
 # If we don't have a server, we need dhcp
 if [ -z "$server" ]; then
+    # shellcheck disable=SC2034
     DHCPORSERVER="1"
 fi
 
 # Done, all good!
+# shellcheck disable=SC2034
 rootok=1
 
-echo '[ -e $NEWROOT/proc ]' > $hookdir/initqueue/finished/cifsroot.sh
+# shellcheck disable=SC2016
+echo '[ -e $NEWROOT/proc ]' > "$hookdir"/initqueue/finished/cifsroot.sh