1 #!/bin/bash
2
3 while true
4 do
5 #res1= $(mount1)
6 echo '1' | sudo -S mount -t cifs //192.168.0.70/ssd/ /mnt/share -o use rname='root',password='root'
7 res2=`echo $?`# $? 表示上个命令是否执行完毕
8 echo $res2
9 if [ $res2 == 0 ]; then
10
11 echo "mount suceeded"
12 break
13 else
14 echo "mount faild"
15 continue
16 fi
17 done
~
shell 文件开启
最新推荐文章于 2024-06-16 14:05:49 发布