|
Revision 7501, 0.7 KB
(checked in by soma, 20 months ago)
|
|
contrib/meshwizard: Cleanup and add ssid_scheme option
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # Setup_splash, takes 1 argument: 1=net |
|---|
| 3 | |
|---|
| 4 | . /etc/functions.sh |
|---|
| 5 | . $dir/functions.sh |
|---|
| 6 | |
|---|
| 7 | net=$1 |
|---|
| 8 | |
|---|
| 9 | handle_splash() { |
|---|
| 10 | config_get network "$1" network |
|---|
| 11 | if [ "$network" == "${netrenamed}dhcp" ]; then |
|---|
| 12 | if [ "$cleanup" == 1 ]; then |
|---|
| 13 | section_cleanup luci_splash.$1 |
|---|
| 14 | else |
|---|
| 15 | if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then |
|---|
| 16 | section_rename luci_splash $1 ${netrenamed}dhcp |
|---|
| 17 | fi |
|---|
| 18 | fi |
|---|
| 19 | fi |
|---|
| 20 | } |
|---|
| 21 | config_load luci_splash |
|---|
| 22 | config_foreach handle_splash iface |
|---|
| 23 | |
|---|
| 24 | uci batch << EOF |
|---|
| 25 | set luci_splash.${netrenamed}dhcp="iface" |
|---|
| 26 | set luci_splash.${netrenamed}dhcp.network="${netrenamed}dhcp" |
|---|
| 27 | set luci_splash.${netrenamed}dhcp.zone="freifunk" |
|---|
| 28 | EOF |
|---|
| 29 | |
|---|
| 30 | uci_commitverbose "Setup dhcpsplash for ${netrenamed}dhcp" luci_splash |
|---|
| 31 | |
|---|
| 32 | /etc/init.d/luci_splash enable |
|---|
| 33 | |
|---|