kiddin9 4 years ago
parent
commit
b2d626f3ce

+ 3 - 0
devices/common/.config

@@ -62,6 +62,7 @@ CONFIG_PACKAGE_zoneinfo-asia=y
 CONFIG_PACKAGE_my-default-settings=y
 CONFIG_PACKAGE_wget-ssl=y
 CONFIG_PACKAGE_curl=y
+CONFIG_LIBCURL_OPENSSL=y
 CONFIG_PACKAGE_htop=y
 CONFIG_PACKAGE_nano=y
 CONFIG_PACKAGE_iptables-mod-fullconenat=y
@@ -71,6 +72,7 @@ CONFIG_XRAY_CORE_COMPRESS_UPX=n
 CONFIG_PACKAGE_zram-swap=y
 CONFIG_PACKAGE_liblzo=y
 CONFIG_PACKAGE_lz4=y
+CONFIG_PACKAGE_kmod-lib-lz4=y
 CONFIG_PACKAGE_zstd=y
 CONFIG_NODEJS_14=y
 
@@ -90,6 +92,7 @@ CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO=y
 CONFIG_PACKAGE_libopenssl-devcrypto=y
 
 CONFIG_PACKAGE_kmod-macvlan=y
+CONFIG_PACKAGE_kmod-ipvlan=y
 CONFIG_PACKAGE_kmod-tun=y
 CONFIG_PACKAGE_kmod-ipt-core=y
 CONFIG_PACKAGE_kmod-ipt-filter=y

+ 3 - 2
devices/common/default-settings

@@ -29,8 +29,6 @@ echo $(uci -q get uhttpd.main.index_page) | grep -q "cgi-bin/luci" ||
 
 sed -i "s/git-.*-\(.*\)/git-\1/g" /usr/lib/lua/luci/version.lua
 
-ln -s /sbin/poweroff /sbin/shutdown
-
 sed -i '/S99opkg/d' /etc/crontabs/root
 hour="$(grep -m1 -ao '[5-7]' /dev/urandom | head -n1)"
 min="$(grep -m1 -ao '[0-5][0-9]' /dev/urandom | head -n1)"
@@ -155,6 +153,9 @@ test $version -lt 1 && {
 	uci -q set dhcp.@dnsmasq[0].rebind_protection='0'
 	uci -q set dhcp.@dnsmasq[0].rebind_localhost='1'
 	uci commit dhcp
+	uci -q set system.@system[0].zram_comp_algo='zstd'
+	uci -q set system.@system[0].zram_size_mb="$(expr $memtotal / 1024 / 3)"
+	uci commit system
 	version=1
 }
 

+ 0 - 14
devices/common/patches/opkginstall.patch

@@ -238,17 +238,3 @@
  	return $ret
  }
  
-
---- a/package/base-files/files/lib/functions.sh
-+++ b/package/base-files/files/lib/functions.sh
-@@ -283,7 +283,9 @@ default_postinst() {
- 			if [ "$PKG_UPGRADE" != "1" ]; then
- 				"$i" enable
- 			fi
--			"$i" start
-+			if "$i" enabled; then
-+				"$i" start
-+			fi
- 		fi
- 	done
- 

+ 38 - 0
devices/common/patches/package.patch

@@ -11,3 +11,41 @@
 +endef
 +endif
 +
+
+--- a/package/base-files/files/lib/functions.sh
++++ b/package/base-files/files/lib/functions.sh
+@@ -283,7 +283,9 @@ default_postinst() {
+ 			if [ "$PKG_UPGRADE" != "1" ]; then
+ 				"$i" enable
+ 			fi
+-			"$i" start
++			if "$i" enabled; then
++				"$i" start
++			fi
+ 		fi
+ 	done
+ 
+
+--- a/package/feeds/luci/luci-base/root/etc/init.d/ucitrack
++++ b/package/feeds/luci/luci-base/root/etc/init.d/ucitrack
+@@ -8,7 +8,7 @@ register_init() {
+ 	local init="$2"
+ 	shift; shift
+ 
+-	if [ -x "$init" ] && "$init" enabled && ! grep -sqE 'USE_PROCD=.' "$init"; then
++	if [ -x "$init" ] && ! grep -sqE 'USE_PROCD=.' "$init"; then
+ 		logger -t "ucitrack" "Setting up /etc/config/$config reload trigger for non-procd $init"
+ 		procd_add_config_trigger "config.change" "$config" "$init" "$@"
+ 	fi
+
+--- a/package/feeds/luci/luci-base/root/sbin/luci-reload
++++ b/package/feeds/luci/luci-base/root/sbin/luci-reload
+@@ -26,7 +26,7 @@ reload_exec() {
+ }
+ 
+ reload_init() {
+-	[ -x /etc/init.d/$2 ] && /etc/init.d/$2 enabled && {
++	[ -x /etc/init.d/$2 ] && {
+ 		echo "Reloading $1... "
+ 		/etc/init.d/$2 reload >/dev/null 2>&1
+ 		[ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!'