mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
contrib: alpine: first draft uninstall script
Purpose of script is to restore an Alpine Linux install to its default state. Some trace elements of Finit may remain, but critical parts like reverting back to /bin/busybox as /sbin/init are in place at least. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x`id -u`" != "x0" ]; then
|
||||
echo
|
||||
echo "*** This script must run as root"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -p "Do you really want to uninstall Finit (y/N)? " yorn
|
||||
|
||||
if [ "x$yorn" = "xy" -o "x$yorn" = "xY" ]; then
|
||||
echo
|
||||
echo "*** Removing all Finit files ..."
|
||||
rm -rf /usr/share/doc/finit
|
||||
rm -rf /etc/finit.conf
|
||||
rm -rf /etc/finit.d
|
||||
if [ -e /etc/rc.local ]; then
|
||||
echo "*** Skipping /etc/rc.local, not sure if we installed it ..."
|
||||
fi
|
||||
|
||||
echo "*** Restoring BusyBox as /sbin/init ..."
|
||||
cd /sbin
|
||||
rm init
|
||||
ln -s /bin/busybox init
|
||||
echo "*** Done"
|
||||
echo
|
||||
else
|
||||
echo
|
||||
echo "*** Aborting uninstall."
|
||||
echo
|
||||
fi
|
||||
Reference in New Issue
Block a user