2 # Setup_splash, takes 1 argument: 1=net
8 vap
=$
(uci
-q get meshwizard.netconfig.
${net}_vap
)
10 if [ ! "$has_luci_splash" == TRUE
]; then
11 echo " Luci Splash is not installed, skipping setup of it."
15 set_defaults
"luci_splash_" luci_splash.general
16 uci_commitverbose
"Setup general splash settings" luci_splash
18 dhcprange
=$
(uci
-q get meshwizard.netconfig.
$net\_dhcprange
)
22 set luci_splash.$1="iface"
23 set luci_splash.$1.network="$1"
24 set luci_splash.$1.zone="freifunk"
28 if [ "$(uci -q get meshwizard.netconfig.$net\_dhcp)" = 1 ] && [ -n "$dhcprange" ]; then
30 config_get network
"$1" network
31 if [ "$network" == "${netrenamed}dhcp" ]; then
32 if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
33 section_rename luci_splash
$1 ${netrenamed}dhcp
37 config_load luci_splash
38 config_foreach handle_splash iface
40 if [ "$supports_vap" = 1 -a "$vap" = 1 ]; then
41 splash_net_add
${netrenamed}dhcp
42 uci_commitverbose
"Setup dhcpsplash for ${netrenamed}dhcp" luci_splash
45 ahdhcp_when_vap
="$(uci get profile_$community.profile.adhoc_dhcp_when_vap)"
46 if [ "$supports_vap" = 0 ] || \
47 [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ] || \
48 [ "$lan_dhcp" = 1 ]; then
49 splash_net_add
${netrenamed}ahdhcp
50 uci_commitverbose
"Setup dhcpsplash for ${netrenamed}ahdhcp" luci_splash
52 /etc
/init.d
/luci_splash
enable