Forráskód Böngészése

T113-S3 满盘升级,会导致升级不了

liyi 1 hónapja%!(EXTRA string=óta)
szülő
commit
8665e2a9d0
2 módosított fájl, 77 hozzáadás és 0 törlés
  1. 9 0
      output/t113s/push/push.bat
  2. 68 0
      output/t113s/push/tools/delete.sh

+ 9 - 0
output/t113s/push/push.bat

@@ -22,6 +22,15 @@ SET USR=root
 SET FBAT=%CURDIR%\tools\script.sh
 SET PWD=tina
 
+SET DELETE=%CURDIR%\tools\delete.sh
+
+::delete file
+ECHO  y  | %PLINK%  -ssh -t  -pw %PWD% %USR%@%IP% -m %DELETE%
+IF %ERRORLEVEL% NEQ 0 (
+    ECHO upgrade failed!
+    EXIT /B 2
+)
+
 ::send file
 ECHO send %TARGET% to device ...
 ECHO  y  | %PSCP%  -pw %PWD% %OUTDIR%\%TARGET% root@%IP%:%DEVDIR%

+ 68 - 0
output/t113s/push/tools/delete.sh

@@ -0,0 +1,68 @@
+#!/bin/sh
+
+obj=pdutar
+
+function kill_proc()
+{
+    proc=$1
+    kill -9 $(ps | grep $proc | grep -v grep | awk '{print $1}')
+}
+
+function kill_all()
+{
+    kill_proc smartMonitor.sh
+    killall  RestartApp.sh smartMornitor.sh smartMonitor.sh snmpd  Qt_Test  smartPDU
+    sleep 1
+    echo V > /dev/watchdog
+    sleep 1
+    echo V > /dev/watchdog
+}
+function rm_old()
+{
+    rm -f  /etc/init.d/S90PDUStart
+    rm -rf /usr/local/snmpd
+    rm -f  /usr/lib/libnetsnmp*
+    rm -f  /usr/sbin/smartMornitor.sh
+    rm -f  /usr/libmpr.so /usr/libhttp.so /usr/lib/libesp.o /usr/lib/libmodbus*
+}
+function chg_net()
+{
+   curIP=`ifconfig eth0 |sed -n '/inet addr/s/^[^:]*:\([0-9.]\{7,15\}\) .*/\1/p'`
+   text="# interface file auto-generated by buildroot\n\
+\n\
+auto lo\n\
+iface lo inet loopback\n\
+\n\
+auto eth0\n\
+iface eth0 inet static\n\
+  address $curIP\n\
+  netmask 255.255.255.0\n\
+  gateway 192.168.1.1\n\
+\n"
+
+  echo -e $text > /etc/network/interfaces
+  ifconfig eth0 $curIP
+}
+
+
+kill_all
+#rm_old
+
+cd /mnt/UDISK/
+
+
+rm -rf app web fw
+
+
+
+
+
+#chg_net
+
+echo ++++ delete ok! ++++
+
+exit 0
+
+
+
+