Whamcloud - gitweb
LU-15103 tests: clean up busy cifs mount
[fs/lustre-release.git] / lustre / tests / setup-cifs.sh
index 9815f1e..9b91e43 100644 (file)
@@ -50,7 +50,9 @@ EOF"
        do_node $smbsrv "testparm -s >$smbsmall"
        do_node $smbsrv "testparm -s $smbsmall >$smbconf"
 
        do_node $smbsrv "testparm -s >$smbsmall"
        do_node $smbsrv "testparm -s $smbsmall >$smbconf"
 
-       do_node $smbsrv "echo $smbpasswd | tee - | smbpasswd -a $smbuser -s"
+       do_node $smbsrv "echo $smbpasswd | tee - | smbpasswd -a $smbuser -s" ||
+               do_node $smbsrv "printf '$smbpasswd\n$smbpasswd\n' |\
+                       tee - | smbpasswd -a $smbuser -s"
 }
 
 restore_config_smb() {
 }
 
 restore_config_smb() {
@@ -92,6 +94,6 @@ cleanup_cifs() {
        local smbclients=${3}
 
        echo -e "\nUnmounting CIFS clients..."
        local smbclients=${3}
 
        echo -e "\nUnmounting CIFS clients..."
-       do_nodes $smbclients "umount -f $smbclimntpt" || return 1
+       zconf_umount_clients $smbclients $smbclimntpt -f || return 1
        do_node $smbsrv "service smb stop"
 }
        do_node $smbsrv "service smb stop"
 }