diff options
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/rc.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/daemons/rc.sh b/daemons/rc.sh index 5d0eb0ae..a97c3723 100644 --- a/daemons/rc.sh +++ b/daemons/rc.sh @@ -50,8 +50,12 @@ test -r /etc/hostname && hostname `cat /etc/hostname` echo -n cleaning up left over files... rm -f /etc/nologin rm -f /var/lock/LCK.* -(cd /tmp; find . ! -name . ! -name lost+found ! -name quotas -exec rm -r {} \; ) -(cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; }) +if test -d /tmp; then + (cd /tmp; find . ! -name . ! -name lost+found ! -name quotas -exec rm -r {} \; ) +fi +if test -d /var/run; then + (cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; }) +fi echo done #echo -n restoring pty permissions... |