summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/etc/init.d/network7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/base-files/files/etc/init.d/network b/package/base-files/files/etc/init.d/network
index 3587c24aaa..43d0a84232 100755
--- a/package/base-files/files/etc/init.d/network
+++ b/package/base-files/files/etc/init.d/network
@@ -9,9 +9,12 @@ boot() {
include /lib/network
setup_switch
- [ -s /etc/config/wireless ] || \
+ grep -qs config /etc/config/wireless && {
+ /sbin/wifi up
+ } || {
+ rm -f /etc/config/wireless
/sbin/wifi detect > /etc/config/wireless
- /sbin/wifi up
+ }
}
start() {