improve cleanup

remove openssh and wpa_supplicant packages and other config files
Networking will still operate as long as services are not stopped
This commit is contained in:
macmpi 2023-02-24 16:00:54 +01:00
parent 2884acd1a9
commit 8bef9afe65
2 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -101,11 +101,17 @@ cat <<-EOF >> /etc/conf.d/sshd
rc-service sshd start
## Prep for final post-cleanup
## clears any installed packages and settings
cat <<-EOF > /tmp/.trash/post-cleanup
#!/bin/sh
logger -st ${0##*/} "Cleaning-up..."
mv /etc/ssh/sshd_config.orig /etc/ssh/sshd_config
mv /etc/conf.d/sshd.orig /etc/conf.d/sshd
apk del openssh
apk del wpa_supplicant
rm -rf /etc/wpa_supplicant
rm /etc/network/interfaces
rm /etc/hostname
rm /etc/modules-load.d/g_ether.conf
rm /etc/modprobe.d/g_ether.conf
rc-update del local default