kiddin9 4 vuotta sitten
vanhempi
sitoutus
e9cb6ca9c7

+ 7 - 5
devices/common/diy.sh

@@ -19,10 +19,12 @@ sed -i 's/\/cgi-bin\/\(luci\|cgi-\)/\/\1/g' `find package/feeds/custom/luci-*/ -
 sed -i 's/Os/O2/g' include/target.mk
 sed -i 's/Os/O2/g' include/target.mk
 sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' package/Makefile
 sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' package/Makefile
 sed -i 's/root:.*/root:$1$tTPCBw1t$ldzfp37h5lSpO9VXk4uUE\/:18336:0:99999:7:::/g' package/base-files/files/etc/shadow
 sed -i 's/root:.*/root:$1$tTPCBw1t$ldzfp37h5lSpO9VXk4uUE\/:18336:0:99999:7:::/g' package/base-files/files/etc/shadow
-sed -i '$a /etc/sysupgrade.conf' package/base-files/files/lib/upgrade/keep.d/base-files-essential
-sed -i '$a /etc/acme' package/base-files/files/lib/upgrade/keep.d/base-files-essential
-sed -i '$a /etc/bench.log' package/base-files/files/lib/upgrade/keep.d/base-files-essential
-sed -i '/\/etc\/profile/d' package/base-files/files/lib/upgrade/keep.d/base-files-essential
+sed -i -e '$a /etc/sysupgrade.conf' \
+       -e '/etc/sysupgrade.conf' \
+       -e '$a /etc/bench.log' \
+       -e '/\/etc\/profile/d' \
+       -e '/\/etc\/shinit/d' \
+       package/base-files/files/lib/upgrade/keep.d/base-files-essential
 sed -i '/^\/etc\/profile/d' package/base-files/Makefile
 sed -i '/^\/etc\/profile/d' package/base-files/Makefile
 # find target/linux/x86 -name "config*" -exec bash -c 'cat kernel.conf >> "{}"' \;
 # find target/linux/x86 -name "config*" -exec bash -c 'cat kernel.conf >> "{}"' \;
 sed -i '$a CONFIG_ACPI=y\nCONFIG_X86_ACPI_CPUFREQ=y\nCONFIG_NR_CPUS=128\nCONFIG_FAT_DEFAULT_IOCHARSET="utf8"\nCONFIG_CRYPTO_CHACHA20_NEON=y\n \
 sed -i '$a CONFIG_ACPI=y\nCONFIG_X86_ACPI_CPUFREQ=y\nCONFIG_NR_CPUS=128\nCONFIG_FAT_DEFAULT_IOCHARSET="utf8"\nCONFIG_CRYPTO_CHACHA20_NEON=y\n \
@@ -59,4 +61,4 @@ if [ -f sdk.tar.xz ]; then
 	fi
 	fi
 	ln -sf /usr/bin/python3 staging_dir/host/bin/python3
 	ln -sf /usr/bin/python3 staging_dir/host/bin/python3
 fi
 fi
-) &
+) &

+ 2 - 1
devices/common/patches/colored_shell.patch

@@ -1,9 +1,10 @@
 --- a/package/base-files/files/etc/shinit
 --- a/package/base-files/files/etc/shinit
 +++ b/package/base-files/files/etc/shinit
 +++ b/package/base-files/files/etc/shinit
-@@ -2,6 +2,7 @@
+@@ -2,6 +2,8 @@
  [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
  [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
  
  
  alias ll='ls -alF --color=auto'
  alias ll='ls -alF --color=auto'
++alias reboot='(/bin/busybox reboot &);sleep 3;/bin/busybox reboot -f'
 +PS1='\[\033[35;1m\]\u\[\033[0m\]@\[\033[31;1m\]\h \[\e[36m\]\@\[\e[m\] \[\033[32;1m\]\W\[\033[0m\]\[\033[31m\]\$\[\033[0m\] '
 +PS1='\[\033[35;1m\]\u\[\033[0m\]@\[\033[31;1m\]\h \[\e[36m\]\@\[\e[m\] \[\033[32;1m\]\W\[\033[0m\]\[\033[31m\]\$\[\033[0m\] '
  
  
  [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
  [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc

+ 1 - 1
devices/common/patches/nginx_luci.patch

@@ -11,7 +11,7 @@
  		uwsgi_pass unix:////var/run/luci-webui.socket;
  		uwsgi_pass unix:////var/run/luci-webui.socket;
  }
  }
 -location ~ /cgi-bin/cgi-(backup|download|upload|exec) {
 -location ~ /cgi-bin/cgi-(backup|download|upload|exec) {
-+location ~ /cgi-(backup|download|upload|exec|bin) {
++location ~ /cgi-(backup|download|upload|exec) {
  		include uwsgi_params;
  		include uwsgi_params;
  		uwsgi_param SERVER_ADDR $server_addr;
  		uwsgi_param SERVER_ADDR $server_addr;
  		uwsgi_modifier1 9;
  		uwsgi_modifier1 9;