Skip to content

Commit bcd34f7

Browse files
author
Invers3
committed
Update pw
Fixed autorun stuck on web
1 parent f21ab17 commit bcd34f7

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

etc/config/pw

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ config params
44
option interface 'br-lan'
55
option version '1100'
66
option timeout '0'
7-
option retry 'no'
8-
option sleep 'yes'
7+
option retry 'yes'
8+
option sleep 'no'
99
option stage1 '/root/stage1/1100.bin'
1010
option stage2 '/root/stage2/1100.bin'

etc/init.d/pw

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh /etc/rc.common
22

3-
START=20
3+
START=80
44
STOP=15
55

66
start() {
@@ -15,15 +15,6 @@ start() {
1515
stage2=$(uci get pw.@params[0].stage2)
1616
timeout=$(uci get pw.@params[0].timeout)
1717

18-
if pgrep pppoe-server > /dev/null; then
19-
/etc/init.d/pppoe-server stop
20-
sleep 3
21-
fi
22-
23-
ip link set $interface down
24-
sleep 5
25-
ip link set $interface up
26-
2718
if [ "$sleep" = "yes" ]; then
2819
sleep="--real-sleep"
2920
elif [ "$sleep" = "no" ]; then
@@ -35,6 +26,15 @@ start() {
3526
retry=""
3627
fi
3728

29+
if pgrep pppoe-server > /dev/null; then
30+
/etc/init.d/pppoe-server stop
31+
sleep 3
32+
fi
33+
34+
ip link set $interface down
35+
sleep 5
36+
ip link set $interface up
37+
3838
result=$(pppwn --interface "$interface" --fw "$version" --stage1 "$stage1" --stage2 "$stage2" --timeout $timeout $sleep $retry)
3939

4040
if [[ "$result" == *"\[\+\] Done\!"* ]]; then

0 commit comments

Comments
 (0)