Blob Blame History Raw
From 31d0b55b86e7e2a52511621d1253109c05fda6f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Thu, 20 Aug 2020 17:36:30 +0200
Subject: [PATCH] 95cifs: pass rootflags to mount

---
 modules.d/95cifs/cifs-lib.sh | 2 +-
 modules.d/95cifs/cifsroot.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules.d/95cifs/cifs-lib.sh b/modules.d/95cifs/cifs-lib.sh
index 8e192041..ab51106c 100755
--- a/modules.d/95cifs/cifs-lib.sh
+++ b/modules.d/95cifs/cifs-lib.sh
@@ -30,5 +30,5 @@ cifs_to_var() {
     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
-    options="user=$cifsuser,pass=$cifspass"
+    options="user=$cifsuser,pass=$cifspass,$(getarg rootflags=)"
 }
diff --git a/modules.d/95cifs/cifsroot.sh b/modules.d/95cifs/cifsroot.sh
index 10f4f3bd..11d362e8 100755
--- a/modules.d/95cifs/cifsroot.sh
+++ b/modules.d/95cifs/cifsroot.sh
@@ -16,7 +16,7 @@ echo server: $server
 echo path: $path
 echo options: $options
 
-mount.cifs //$server/$path $NEWROOT -o $options && { [ -e /dev/root ] || ln -s null /dev/root ; }
+mount.cifs "//$server/$path" "$NEWROOT" -o "$options" && { [ -e /dev/root ] || ln -s null /dev/root ; }
 
 # inject new exit_if_exists
 echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm -f -- "$job"' > $hookdir/initqueue/cifs.sh