This commit is contained in:
13038267101 2022-09-29 10:04:42 +08:00
parent 8e7b3c0f9a
commit 59b66701b6
1 changed files with 13 additions and 1 deletions

View File

@ -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