root/luci/trunk/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_splash.sh @ 7501

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
7net=$1
8
9handle_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}
21config_load luci_splash
22config_foreach handle_splash iface
23
24uci batch << EOF
25set luci_splash.${netrenamed}dhcp="iface"
26set luci_splash.${netrenamed}dhcp.network="${netrenamed}dhcp"
27set luci_splash.${netrenamed}dhcp.zone="freifunk"
28EOF
29
30uci_commitverbose "Setup dhcpsplash for ${netrenamed}dhcp" luci_splash
31
32/etc/init.d/luci_splash enable
33
Note: See TracBrowser for help on using the browser.