Autorecover After Improper Shutdown in Puppy Linux …. cbrl

In Linux 690 views

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

Related Search

Install Pi-Hole DNS Blokir Iklan dan Tracker
Install Pi-Hole DNS Blokir Iklan dan Tracker
Pi-Hole merupakan salah satu pelindung user internet
Migrasi VPS Panel dari Tuxlite ke VestaCP
Migrasi VPS Panel dari Tuxlite ke VestaCP
Setelah sekian lama menggunakan Tuxlite akhirnya diputuskan
Upgrade PHP 5.6 ke PHP 7.0 Nginx Debian Jessie
Upgrade PHP 5.6 ke PHP 7.0 Nginx Debian Jessie
Sebetulnya sudah agak lama warning untuk upgrade
Mengatasi LetsEncrypt Invalid Response Acme-Challenge
Terkadang pada saat proses renewal Certs Letsencrypt

Top