kiddin9 3 tahun lalu
induk
melakukan
767aa6487e

+ 0 - 1
devices/common/diy.sh

@@ -25,7 +25,6 @@ sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' pack
 sed -i "/mediaurlbase/d" package/feeds/*/luci-theme*/root/etc/uci-defaults/*
 sed -i '/root:/c\root:$1$tTPCBw1t$ldzfp37h5lSpO9VXk4uUE\/:18336:0:99999:7:::' package/base-files/files/etc/shadow
 sed -i -e '$a /etc/sysupgrade.conf' \
-       -e '/etc/sysupgrade.conf' \
        -e '$a /etc/bench.log' \
        -e '/\/etc\/profile/d' \
        -e '/\/etc\/shinit/d' \

+ 6 - 5
devices/common/patches/autoupgrade.patch

@@ -1,18 +1,19 @@
 --- a/package/feeds/luci/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
 +++ b/package/feeds/luci/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
-@@ -184,6 +184,16 @@ return view.extend({
+@@ -184,6 +184,17 @@ return view.extend({
  		o.value(8, _('Normal'))
  		o.value(9, _('Warning'))
  
 +		s.tab('firmware', _('Firmware Settings'));
 +
 +		o = s.taboption('firmware', form.Flag, 'autoupgrade_pkg', _('Packages Auto Upgrade'));
-+			o.rmempty = false;
-+			o.default = o.enabled;
++		o.default = o.enabled;
 +
 +		o = s.taboption('firmware', form.Flag, 'autoupgrade_fm', _('Firmware Upgrade Notice'));
-+			o.rmempty = false;
-+			o.default = o.enabled;
++		o.default = o.enabled;
++
++		o = s.taboption('firmware', form.Flag, 'ipv6', _('Enable IPv6'), _('Enable/Disable IPv6'));
++		o.default = o.enabled;
 +
  		/*
  		 * Zram Properties

+ 42 - 0
devices/common/patches/ipv6.patch

@@ -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() {