Skip to content

Commit b628462

Browse files
committed
clear logs, shell history, ssh keys and networks
1 parent b70e09c commit b628462

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Default configuration file for wpa_supplicant.conf(5).
2+
3+
ctrl_interface=/run/wpa_supplicant
4+
ctrl_interface_group=wheel
5+
eapol_version=1
6+
ap_scan=1
7+
fast_reauth=1
8+
update_config=1
9+
passive_scan=1
10+
11+
# Add here your networks.
12+

tools/finalize-nakamochi.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,15 @@ run_main()
292292
echo "done."
293293
fi
294294

295+
# clear logs, shell history, ssh keys and networks
296+
echo -n "Clearing logs, shell history, ssh keys and networks ... "
297+
rm -f "$USD_MOUNT_POINT"/var/log/* 2> /dev/null
298+
for d in "$USD_MOUNT_POINT"/var/log/socklog/*; do echo > "$d/current"; done
299+
rm "$USD_MOUNT_POINT"/root/.bash_history
300+
echo > "$USD_MOUNT_POINT"/root/.ssh/authorized_keys
301+
cp "$(dirname "$0")"/../rootfiles/etc/wpa_supplicant/wpa_supplicant.conf "$USD_MOUNT_POINT"/etc/wpa_supplicant/wpa_supplicant.conf
302+
echo "done."
303+
295304
sync
296305
echo "All DONE, Nakamochi uSD and SSD should be ready!"
297306
}

0 commit comments

Comments
 (0)