Compared files  

Left
/fw/dreame.vacuum.p2041o/4.1.2_1107/xout/_root/etc/rc.d/wifi_monitor.sh
Last modified2021-06-29 12:11:58
Size5.2 Kb (221 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
/fw/dreame.vacuum.p2041/4.3.2_1108/xout/_root/etc/rc.d/wifi_monitor.sh
Last modified2021-11-04 09:38:22
Size4.7 Kb (204 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged14184
Inserted29
Deleted618
Ignored00
Changed530




   Comparison Details  

10 skipped lines
11 11  
12 12 ping_cnt=0
13 13  
  14 if [ ! -f /usr/bin/wifi_manager ]; then
  15     AP_CONFIG_FILE=${WPA_CONF_FILE}
  16 fi
  17  
14 18 function set_wifi_log()
15 19 {
16 20     echo `date` "$1" >> ${WIFI_LOG}
13 skipped lines
30 34 function reboot_wifi_model()
31 35 {
32 36     killall -9 wpa_supplicant
33     killall -9 wifi_manager  
34 37     set_wifi_log "restart wifi driver"
35 38     sleep 1
36     rmmod 8189fs 39     /usr/bin/wifi_act.sh rmmod
37 40     sleep 1
38 41     /etc/init.d/wifi.sh
39 42     sleep 1
40 43     /etc/init.d/wpa_supplicant.sh
41     sleep 2  
42     /etc/rc.d/wifi_manager.sh  
43 44     set_wifi_cnt 0
44 45 }
45 46  
46 47 function restart_wifi_model()
47 48 {
48 49     killall -9 wpa_supplicant
49     killall -9 wifi_manager  
50 50     set_wifi_log "restart wifi application"
51 51     sleep 1
52 52     /etc/init.d/wpa_supplicant.sh
53     sleep 2  
54     /etc/rc.d/wifi_manager.sh  
55 53     set_wifi_cnt 0
56 54 }
57 55  
33 skipped lines
91 89         return 2
92 90     fi
93 91  
94     WPA_PID=`pidof -o %PPID wpa_supplicant` 92     WPAS_PID=`pidof -o %PPID wpa_supplicant`
  93     WPAC_PID=`pidof -o %PPID wpa_cli`
95     if [ -z "${WPA_PID}" ]; then 94     if [ -z "${WPAS_PID}" -o -z "${WPAC_PID}" ]; then
96         set_wifi_log "restart wpa_supplicant" 95         set_wifi_log "restart wpa_supplicant wpa_cli"
97 96         /etc/init.d/wpa_supplicant.sh
98 97         sleep 2
99 98     fi
100 99  
101     WIFIMG_PID=`pidof -o %PPID wifi_manager`  
102     if [ -z "${WIFIMG_PID}" ]; then  
103         sleep 5  
104         WIFIMG_PID2=`pidof -o %PPID wifi_manager`  
105         if [ -z "${WIFIMG_PID2}" ]; then  
106             set_wifi_log "restart wifi_manager"  
107             /etc/rc.d/wifi_manager.sh  
108             set_wifi_cnt 0  
109             return 3  
110         fi  
111     fi  
112 100     return 0
113 101 }
114 102  
6 skipped lines
121 109  
122 110     if [ -f ${WIFI_DISCONNECT} ]; then
123 111         SRC_COUNT=`grep -w "ssid" ${AP_CONFIG_FILE} | wc -l`
124    
125 112         if [ ${SRC_COUNT} -gt 0 ]; then
126 113             let WIFI_COUNT++
127 114             set_wifi_cnt ${WIFI_COUNT}
128             if [ ${WIFI_COUNT} -ge 15 ]; then 115             if [ ${WIFI_COUNT} -ge 30 ]; then
129 116                 restart_wifi_model
130 117             fi
131 118         fi
15 skipped lines
147 134                 fi
148 135             else
149 136                 set_wifi_log "gate way ip is null"
  137                 if [ -f /etc/wifi/udhcpc.sh ]; then
  138                     /etc/wifi/udhcpc.sh &
  139                 else
  140                     udhcpc.sh &
  141                 fi
150 142             fi
151 143         else
152 144             sleep 10
12 skipped lines
165 157         if [ ${SRC_COUNT} -gt 0 ]; then
166 158             WPA_STATE=`wpa_cli status | grep -w wpa_state | cut -d '=' -f 2`
167 159             if [ "${WPA_STATE}" == "COMPLETED" ]; then
168                 UDHCPC_PID=`pidof -o %PPID udhcpc`  
169                 if [ -z "${UDHCPC_PID}" ]; then 160                 if [ -f ${WIFI_CONF_FILE} ]; then
170                     sleep 10 161                     BSSID=`wpa_cli status | grep bssid | awk -F"=" '{print $NF}'`
171                     UDHCPC_PID=`pidof -o %PPID udhcpc`  
172                     if [ -z "${UDHCPC_PID}" ]; then  
173                         set_wifi_log "no udhcpc, start it"  
174                         /etc/wifi/udhcpc.sh >/dev/null 2>&1 &  
175                     fi  
176                 else  
177                     if [ -f ${WIFI_CONF_FILE} ]; then  
178                         touch ${WIFI_CONNECT} 162                     echo "${BSSID}" > ${WIFI_CONNECT}
179                         fsync ${WIFI_CONNECT} 163                     fsync ${WIFI_CONNECT}
180                     fi  
181 164                 fi
182 165             else
183 166                 if [ -f ${WIFI_CONF_FILE} ]; then
18 skipped lines
202 185     exit 0
203 186 fi
204 187  
205 if [ ! -f ${MIIO_WIFI_FILE} ]; then 188 if [ ! -f ${WIFI_CONF_FILE} ]; then
206 189     exit 0
207 190 fi
208 191  
13 skipped lines

   Text comparison Options  

Syntax colouring language used: Shell
Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

Unchanged lineExample of unchanged line
Modified lineExample of modified line
Added lineExample of added line
Removed lineExample of removed line
Ignored lineExample of ignored line