@@ -46,7 +46,7 @@ echo "" >${fix_log} && tolog "Start fixing..."
4646
4747# Fix common releases permissions
4848[[ -d " /var/tmp" ]] && sudo chmod 777 /var/tmp && tolog " 01. Fix tmp permissions"
49- [[ -d " /etc/update-motd.d" ]] && sudo chmod -x /etc/update-motd.d/* && sudo chmod +x /etc/update-motd.d/{10-* ,30-* } 2> /dev/null && tolog " 02. Fix update-motd.d permissions"
49+ [[ -d " /etc/update-motd.d" ]] && sudo chmod -x /etc/update-motd.d/* && sudo chmod +x /etc/update-motd.d/{10-* ,20- * , 30-* } 2> /dev/null && tolog " 02. Fix update-motd.d permissions"
5050[[ -d " /var/cache/man" ]] && sudo chown man:root /var/cache/man -R && tolog " 03. Fix man permissions"
5151[[ -d " /var/cache/man" ]] && sudo chmod g+s /var/cache/man -R && tolog " 04. Fix man permissions"
5252[[ -f " /etc/sudoers" ]] && sudo chown root:root /etc/sudoers && tolog " 05. Fix man permissions"
@@ -100,7 +100,7 @@ motd_tips="/etc/default/armbian-motd"
100100 sed -i ' s|^MOTD_DISABLE=""|MOTD_DISABLE="tips"|g' ${motd_tips}
101101 tolog " 54. Disable tips of the day"
102102}
103- quotes_cron=" /etc/cron.weekly /armbian-quotes"
103+ quotes_cron=" /etc/cron.daily /armbian-quotes"
104104[[ -f " ${quotes_cron} " ]] && {
105105 sed -i " s|^curl |#curl |g" ${quotes_cron}
106106 tolog " 55. Disable quotes cron plan"
@@ -124,7 +124,6 @@ motd_service="/usr/lib/systemd/system/motd-news.service"
124124sudo rm -f /var/lib/systemd/deb-systemd-helper-enabled/timers.target.wants/motd-news.timer
125125sudo rm -f /var/lib/systemd/deb-systemd-helper-enabled/motd-news.timer.dsh-also
126126sudo rm -f /etc/systemd/system/timers.target.wants/motd-news.timer
127- sudo rm -f /etc/update-motd.d/50-motd-news
128127
129128# Disable the system's partition adjustment service
130129sudo systemctl stop armbian-resize-filesystem.service 2> /dev/null
@@ -207,13 +206,15 @@ tolog "59. Disable the ssh.socket and enable ssh.service"
207206 sed -i " s|^REVISION=.*|REVISION=\" ${short_version} \" |g" ${armbian_release_file}
208207 }
209208
209+ sed -i " s|^BOOT_SOC=.*|BOOT_SOC=\" ${soc_name} \" |g" ${armbian_release_file}
210210 sed -i " s|^BOARDFAMILY=.*|BOARDFAMILY=\" ${family_name} \" |g" ${armbian_release_file}
211211 sed -i " s|^LINUXFAMILY=.*|LINUXFAMILY=\" ${platform_name} \" |g" ${armbian_release_file}
212212 sed -i " s|^VENDOR=.*|VENDOR=\" Armbian OS\" |g" ${armbian_release_file}
213213 sed -i " s|^IMAGE_TYPE=.*|IMAGE_TYPE=rebuild|g" ${armbian_release_file}
214214 sed -i " s|^BOARD_TYPE=.*|BOARD_TYPE=diy|g" ${armbian_release_file}
215215 sed -i " s|^FORCE_BOOTSCRIPT_UPDATE=.*|FORCE_BOOTSCRIPT_UPDATE=\" no\" |g" ${armbian_release_file}
216216 sed -i " s|^BOOTSCRIPT_FORCE_UPDATE=.*|BOOTSCRIPT_FORCE_UPDATE=\" no\" |g" ${armbian_release_file}
217+ sed -i " s|^FORCE_UBOOT_UPDATE=.*|FORCE_UBOOT_UPDATE=\" no\" |g" ${armbian_release_file}
217218 tolog " 85. Adjust custom board name: ${armbian_release_file} "
218219 }
219220
@@ -282,12 +283,10 @@ todo_rootfs_resize="/root/.no_rootfs_resize"
282283}
283284
284285# Hidd the IP address of WAN & IPv6
285- [[ -f " /etc/update-motd.d/10-armbian-header" ]] && {
286- # Hide the IP address of WAN
287- sed -i ' s|curl.*akamai.*|curl --connect-timeout 2 -s http://whatismyip.akamai.com/ \| sed -E ' \' ' s/(\.[0-9]+){2}$/.\*\*\*\.\*\*\*/' \' ' |' \
288- /etc/update-motd.d/10-armbian-header 2> /dev/null
289- # Hide the IPv6 address
290- sed -i ' /echo -e "${all_ip6_address}"/s/^/#/' /etc/update-motd.d/10-armbian-header 2> /dev/null
286+ ip_info_file=" /etc/update-motd.d/20-ip-info"
287+ [[ -f " ${ip_info_file} " ]] && {
288+ sed -i ' /^get_wan.*_address/s/{.*/{ true; }/' ${ip_info_file}
289+ sed -i ' /if.*ipv6s.*||.*wan6/,/fi/s/^/#/' ${ip_info_file}
291290 tolog " 93. Hide the IP address of WAN & IPv6"
292291}
293292
0 commit comments