aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-04-03 13:31:59 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-04-03 13:31:59 +0000
commit9965c7f2e32f26f353ca7f7f02581a169808f5ef (patch)
treef30995ce2f6c105006d9bf7f8611c7488c428f3b /package/base-files/files/etc
parentd0f557ddbf80e95756f5c7a3bebf39d0fa8bd5ba (diff)
downloadmaster-187ad058-9965c7f2e32f26f353ca7f7f02581a169808f5ef.tar.gz
master-187ad058-9965c7f2e32f26f353ca7f7f02581a169808f5ef.tar.bz2
master-187ad058-9965c7f2e32f26f353ca7f7f02581a169808f5ef.zip
[package] base-files: also regenerate wifi config if existing config contains only whitespace
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20669 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc')
-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() {