From f67a97184ff30bddaeb875b5ed5d75ac99195d35 Mon Sep 17 00:00:00 2001 From: nagumii Date: Sun, 22 Dec 2024 00:09:42 +0200 Subject: [PATCH 1/2] Update selfdestruct.sh --- .../rootfs_uclibc_rv1106/usr/local/bin/selfdestruct.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/selfdestruct.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/selfdestruct.sh index 48e1d63..e146e6d 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/selfdestruct.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/selfdestruct.sh @@ -13,17 +13,12 @@ dmesg -C rm ~/.bash_history history -c && history -w -# Clear Shell History -rm ~/.bash_history -history -c && history -w - # Clear Temporary Files rm -rf /tmp/* rm -rf /var/tmp/* # Stop BBS service and clear log systemctl stop mesh-bbs.service -rm bbs.log # Clear Package Cache apt-get -y autoremove @@ -81,12 +76,10 @@ echo "------- Delete dummy file -------" rm -f ~/delete_me sync sync +fstrim -v / echo "-------Finish zeroing at $(date)-------" echo "" -# Trim filesystem -fstrim -v / - # Clear dmesg Log dmesg -C From 5c14c6a4a1251a8b2474f6ec9c127dd1e65bcfc1 Mon Sep 17 00:00:00 2001 From: nagumii Date: Sun, 22 Dec 2024 01:24:42 +0200 Subject: [PATCH 2/2] change foxbuntu version file formatting --- foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release | 4 +++- .../out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release index 2d182d2..851c7aa 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release @@ -1 +1,3 @@ -0.95.5a \ No newline at end of file +major=0 +minor=95 +patch=5 \ No newline at end of file diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header index 329dfea..5b43254 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header @@ -29,7 +29,7 @@ if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then fi [ -r /etc/lsb-release ] && . /etc/lsb-release -foxbuntu_version=$(cat /etc/foxbuntu-release) +foxbuntu_version=$(grep -oP 'major=\K[0-9]+' /etc/foxbuntu-release).$(grep -oP 'minor=\K[0-9]+' /etc/foxbuntu-release).$(grep -oP 'patch=\K[0-9]+' /etc/foxbuntu-release) spaces=$((9 - ${#foxbuntu_version})) # Print the result with the appropriate number of spaces