mirror of http://192.168.10.4:8099/sane/dpkg.git
shell
This commit is contained in:
parent
8e7b3c0f9a
commit
59b66701b6
14
build.sh
14
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
|
||||
|
|
Loading…
Reference in New Issue