|
@@ -0,0 +1,42 @@
|
|
|
+--- a/package/base-files/files/etc/init.d/system
|
|
|
++++ b/package/base-files/files/etc/init.d/system
|
|
|
+@@ -10,7 +10,8 @@ validate_system_section() {
|
|
|
+ 'conloglevel:uinteger' \
|
|
|
+ 'buffersize:uinteger' \
|
|
|
+ 'timezone:string:UTC' \
|
|
|
+- 'zonename:string'
|
|
|
++ 'zonename:string' \
|
|
|
++ 'ipv6:string'
|
|
|
+ }
|
|
|
+
|
|
|
+ system_config() {
|
|
|
+@@ -28,6 +29,29 @@ system_config() {
|
|
|
+
|
|
|
+ # apply timezone to kernel
|
|
|
+ hwclock -u --systz
|
|
|
++
|
|
|
++ if [[ "$ipv6" == "0" ]]; then
|
|
|
++ uci -q delete dhcp.lan.dhcpv6
|
|
|
++ uci -q delete dhcp.lan.ra
|
|
|
++ uci -q set network.lan.delegate='0'
|
|
|
++ uci -q set network.wan.ipv6='0'
|
|
|
++ uci -q delete network.globals.ula_prefix
|
|
|
++ uci commit dhcp
|
|
|
++ uci commit network
|
|
|
++ /etc/init.d/odhcpd disable
|
|
|
++ /etc/init.d/odhcpd stop
|
|
|
++ /etc/init.d/network restart
|
|
|
++ elif [[ "$ipv6" == "1" ]]; then
|
|
|
++ uci -q set dhcp.lan.ra='hybrid'
|
|
|
++ uci -q set dhcp.lan.dhcpv6='hybrid'
|
|
|
++ uci -q del network.lan.delegate
|
|
|
++ uci set network.wan.ipv6='auto'
|
|
|
++ uci commit dhcp
|
|
|
++ uci commit network
|
|
|
++ /etc/init.d/odhcpd enable
|
|
|
++ /etc/init.d/odhcpd start
|
|
|
++ /etc/init.d/network restart
|
|
|
++ fi
|
|
|
+ }
|
|
|
+
|
|
|
+ reload_service() {
|