aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/fedora-cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/fedora-cleanup')
-rwxr-xr-xsystemd/fedora-cleanup58
1 files changed, 0 insertions, 58 deletions
diff --git a/systemd/fedora-cleanup b/systemd/fedora-cleanup
deleted file mode 100755
index 4f6b8c0d..00000000
--- a/systemd/fedora-cleanup
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-#
-# Clean out various old state.
-#
-
-SELINUX_STATE=
-if [ -e "/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then
- if [ -r "/selinux/enforce" ] ; then
- SELINUX_STATE=$(cat "/selinux/enforce")
- else
- # assume enforcing if you can't read it
- SELINUX_STATE=1
- fi
-fi
-
-# Clean out /.
-rm -f /fastboot /fsckoptions /forcefsck /.autofsck /forcequotacheck /halt \
- /poweroff /.suspended &> /dev/null
-
-# Do we need (w|u)tmpx files? We don't set them up, but the sysadmin might...
-_NEED_XFILES=
-[ -f /var/run/utmpx ] || [ -f /var/log/wtmpx ] && _NEED_XFILES=1
-
-# Clean up /var.
-rm -rf /var/lock/cvs/* /var/run/screen/*
-find /var/lock /var/run ! -type d -exec rm -f {} \;
-rm -f /var/lib/rpm/__db* &> /dev/null
-rm -f /var/gdm/.gdmfifo &> /dev/null
-
-# Clean up utmp/wtmp
-> /var/run/utmp
-touch /var/log/wtmp /var/log/btmp
-chgrp utmp /var/run/utmp /var/log/wtmp /var/log/btmp
-chmod 0664 /var/run/utmp /var/log/wtmp
-chmod 0600 /var/log/btmp
-if [ -n "$_NEED_XFILES" ]; then
- > /var/run/utmpx
- touch /var/log/wtmpx
- chgrp utmp /var/run/utmpx /var/log/wtmpx
- chmod 0664 /var/run/utmpx /var/log/wtmpx
-fi
-[ -n "$SELINUX_STATE" ] && restorecon /var/run/utmp* /var/log/wtmp* >/dev/null 2>&1
-
-# Clean up various /tmp bits
-[ -n "$SELINUX_STATE" ] && restorecon /tmp
-rm -f /tmp/.X*-lock /tmp/.lock.* /tmp/.gdm_socket /tmp/.s.PGSQL.*
-rm -rf /tmp/.X*-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/hsperfdata_* \
- /tmp/kde-* /tmp/ksocket-* /tmp/mc-* /tmp/mcop-* /tmp/orbit-* \
- /tmp/scrollkeeper-* /tmp/ssh-* \
- /dev/.in_sysinit
-
-# Make ICE directory
-mkdir -m 1777 -p /tmp/.ICE-unix >/dev/null 2>&1
-chown root:root /tmp/.ICE-unix
-[ -n "$SELINUX_STATE" ] && restorecon /tmp/.ICE-unix >/dev/null 2>&1
-
-# create the crash indicator flag to warn on crashes, offer fsck with timeout
-touch /.autofsck &> /dev/null