ipv6helper: set ipv6 under hybrid mode by default

This commit is contained in:
CN_SZTL 2021-01-08 16:20:57 +08:00
parent 40079b5a47
commit 778fadeb4e
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 13 additions and 11 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ipv6helper
PKG_VERSION:=1.0
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
@ -39,18 +39,11 @@ endef
define Build/Compile
endef
define Package/ipv6helper/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
chmod 755 /etc/hotplug.d/iface/60-6in4 >/dev/null 2>&1
fi
exit 0
endef
define Package/ipv6helper/install
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/root/etc/hotplug.d/iface/60-6in4 $(1)/etc/hotplug.d/iface/60-6in4
$(INSTALL_BIN) ./files/60-6in4 $(1)/etc/hotplug.d/iface/60-6in4
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/60-ipv6-hybrid $(1)/etc/uci-defaults/60-ipv6-hybrid
endef
$(eval $(call BuildPackage,ipv6helper))

View File

@ -0,0 +1,9 @@
#!/bin/sh
uci set dhcp.lan.ra='hybrid'
uci set dhcp.lan.ndp='hybrid'
uci set dhcp.lan.dhcpv6='hybrid'
uci set dhcp.lan.ra_management='1'
uci commit dhcp
exit 0