summaryrefslogtreecommitdiff
path: root/package/base-files/files
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
commit10c00a63684c778d05306f5d3c8ea1a262a6ced2 (patch)
treea3b6c250df97da7d0ce0be79709ecb0a7add1373 /package/base-files/files
parenta0a640003469941c9067d8fab6e272a088aa45d8 (diff)
downloadmtk-20170518-10c00a63684c778d05306f5d3c8ea1a262a6ced2.zip
mtk-20170518-10c00a63684c778d05306f5d3c8ea1a262a6ced2.tar.gz
mtk-20170518-10c00a63684c778d05306f5d3c8ea1a262a6ced2.tar.bz2
base-files: also regenerate wifi config if existing config contains only whitespace
SVN-Revision: 20669
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 3587c24..43d0a84 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() {