summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/meshwizard/files
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-10-06 19:39:58 +0000
committerManuel Munz <freifunk@somakoma.de>2011-10-06 19:39:58 +0000
commit871091ee200d983d6e10f00583a9fc5acd188b71 (patch)
tree1fdaff4e972667e4fdf77dfca92cf9a0e845380c /contrib/package/meshwizard/files
parent712620451cbcf34bf2c39b4185000b1ebd69acf8 (diff)
contrib/meshwizard: add helpers/restore_default_config.sh
Diffstat (limited to 'contrib/package/meshwizard/files')
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/restore_default_config.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/restore_default_config.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/restore_default_config.sh
new file mode 100755
index 0000000000..3f6ce3587d
--- /dev/null
+++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/restore_default_config.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# This will restore default "factory" settings before running the meshwizard
+# and is used when cleanup=1
+# Warning: This will reset network settings for wan and lan to defaults too.
+
+echo "+ Restore default config as requested with cleanup=1"
+cp -f /rom/etc/config/* /etc/config/
+rm /etc/config/wireless
+wifi detect > /etc/config/wireless
+rm /etc/config/network
+/etc/init.d/defconfig start