Autorecover After Improper Shutdown in Puppy Linux …. cbrl

Use the script below and insert it to rc.sysinit script in t /etc/rc.d folder after t “Making filesystem usabel” part,

############ clean-shutdown-detect ##############
#Detect and clean improper shutdown

if [ -f /tmp/RUNNING ];then
echo -n “Cleaning up after Improper Shutdown….” >/dev/console
rm -f /var/log/X*
rm -f /tmp/RUNNING
rm -rf /tmp/*
rm -f /var/lock/LCK*
rm -f /var/run/*.pid
rm -rf /root/tmp 2>/dev/null
rm -rf /root/.thumbnails/* 2>/dev/null
[ -f /etc/rc.d/MORESFS ] && rm /etc/rc.d/MORESFS
status_func 0
fi

#Create a file in tmp that should be deleted on a clean shutdown
if [ ! -f /tmp/RUNNING ];then
echo “This file is deleted during a clean shutdown.” > /tmp/RUNNING
fi
########## end-clean-shutdown-detect #############

or download a rc.sysinit file that already modified in here

don’t forget to change the permission using :

chmod +x /etc/rc.d/rc.sysinit

Puppy Linux 4.3.1 ……
Download from ibiblio.org: pup-431.iso or explore the folder.
Download from nluug.nl: pup-431.iso or explore the folder.

source : murga-linux.com