diff --git a/build.sh b/build.sh index 01a56bc..026addb 100755 --- a/build.sh +++ b/build.sh @@ -24,8 +24,9 @@ if [ $2 ]; then password=$2 fi -echo "$password" +echo "$password" +sleep 1 if [ "$oem" != "hg" ] && [ "$oem" != "lsc" ] && [ "$oem" != "hw" ] && [ "$oem" != "hgweb" ] && [ "$oem" != "lscweb" ] && [ "$oem" != "hwweb" ] && [ "$oem" != "hgso" ] && [ "$oem" != "lscso" ] && [ "$oem" != "hwso" ]; then echo "参数错误!!!" @@ -35,11 +36,21 @@ fi function getismount() { + if [ ! -d "/home/samba" ];then + + echo $password|sudo -S mkdir -p "/home/samba" + echo $password|sudo -S mount -t cifs //192.168.100.140/huagao /home/samba/ -o username=huagao,password=hg123123 + fi mountpoint -q /home/samba ismount=$? if [ $ismount != 0 ];then echo "$(date):mount is fail!!! and reboot mount" echo $password|sudo -S mount -t cifs //192.168.100.140/huagao /home/samba/ -o username=huagao,password=hg123123 + if [ ! $? ];then + echo "$(date):mount is fail!!!" + exit 1 + fi + ismount=$? else echo "$(date):mount is succeed" fi @@ -311,6 +322,7 @@ getismount if [ $ismount == 0 ];then if [ -d "$FIND_FILE/$syspath" ];then + echo "$(date):mount is succeed and cp dpkg" echo $password|sudo -S cp -rf backup/dpkg/$mainverstr.$minver $FIND_FILE/$syspath fi fi