Browse Source

active le portail captif

Emmanuel Garette 3 months ago
parent
commit
54584aebe5
3 changed files with 8 additions and 5 deletions
  1. 5
    2
      captive/configure_captive.sh
  2. 2
    2
      make_ipk.sh
  3. 1
    1
      management/do_upgrade.sh

+ 5
- 2
captive/configure_captive.sh View File

@@ -1,12 +1,15 @@
1 1
 #!/bin/sh
2 2
 
3
+[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
4
+[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
5
+
3 6
 # configure DNSMASQ pour que le serveur DNS
4 7
 # reponde toujours l'adresse locale
5 8
 # configure egalement RFC 7710 Captive-Portal Identification
6 9
 LAN_ADDRESS=$(uci -q get network.lan.ipaddr)
7 10
 echo """address=/#/$LAN_ADDRESS
8
-dhcp-option=160,http://$LAN_ADDRESS
9
-dhcp-option-force=160,http://$LAN_ADDRESS
11
+dhcp-option=160,http://$LAN_ADDRESS
12
+dhcp-option-force=160,http://$LAN_ADDRESS
10 13
 """ > /tmp/dnsmasq.d/quid 
11 14
 
12 15
 # redemarre DNSMASQ

+ 2
- 2
make_ipk.sh View File

@@ -20,9 +20,9 @@ fi
20 20
 # build package
21 21
 cd /srv/cadoles
22 22
 rm -rf depot/* tmp
23
-mkdir -p tmp/src/opt/quid tmp/src/opt/cadoles
23
+mkdir -p tmp/src/opt/quid tmp/src/opt/cadoles tmp/src/etc/hotplug.d/iface/
24 24
 tar zxf $SRC --strip-components 1 --one-top-level=tmp/src/opt/quid
25
-cp -a configure_captive.sh tmp/src/opt/quid
25
+cp -a configure_captive.sh tmp/src/etc/hotplug.d/iface/30-captive
26 26
 cp -a management/* tmp/src/opt/cadoles
27 27
 cd tmp/src/
28 28
 tar zcf ../data.tar.gz ./

+ 1
- 1
management/do_upgrade.sh View File

@@ -29,7 +29,7 @@ if [ -z $TYPE ] && [ $VERSION = $DISTRIB_RELEASE ]; then
29 29
         opkg update
30 30
         opkg install libustream-openssl
31 31
         # remove luci
32
-        opkg remove luci uhttpdd luci-mod-admin-full luci-base luci-lib-nixio luci-lib-jsonc luci-proto-ppp luci-app-firewall luci-theme-bootstrap luci-lib-ip luci-proto-ipv6 liblucihttp-lua liblucihttp
32
+        opkg remove luci uhttpd luci-mod-admin-full luci-base luci-lib-nixio luci-lib-jsonc luci-proto-ppp luci-app-firewall luci-theme-bootstrap luci-lib-ip luci-proto-ipv6 liblucihttp-lua liblucihttp
33 33
     fi
34 34
     echo "src/gz openwrt_core https://$REPO/releases/$VERSION/targets/mvebu/cortexa9/packages
35 35
 src/gz openwrt_base https://$REPO/releases/$VERSION/packages/arm_cortex-a9_vfpv3/base