aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts.spec2
-rwxr-xr-xrc.d/rc.sysinit22
2 files changed, 4 insertions, 20 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 93b8d67c..964dbdc3 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -21,7 +21,7 @@ Requires: upstart, event-compat-sysv
%else
Requires: SysVinit >= 2.85-38
%endif
-Requires: /sbin/ip, /sbin/arping, net-tools
+Requires: /sbin/ip, /sbin/arping, net-tools, /bin/find
Requires: /etc/redhat-release, dev
Requires: ethtool >= 1.8-2, /sbin/runuser
Requires: udev >= 115-1
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 1c149227..db761415 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -427,7 +427,6 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
mount_dirs() {
if [ -e "$1" ]; then
mkdir -p "$RW_MOUNT$1"
- # fixme: find is bad
find "$1" -type d -print0 | cpio -p -0vd "$RW_MOUNT" &>/dev/null
mount -n --bind "$RW_MOUNT$1" "$1"
fi
@@ -751,24 +750,9 @@ rm -f /fastboot /fsckoptions /forcefsck /.autofsck /forcequotacheck /halt \
_NEED_XFILES=
[ -f /var/run/utmpx -o -f /var/log/wtmpx ] && _NEED_XFILES=1
-# Clean up /var. I'd use find, but /usr may not be mounted.
-for afile in /var/lock/* /var/run/* ; do
- if [ -d "$afile" ]; then
- case "$afile" in
- */news|*/mon) ;;
- */sudo) rm -f $afile/*/* ;;
- */vmware) rm -rf $afile/*/* ;;
- */samba) rm -rf $afile/*/* ;;
- */screen) rm -rf $afile/* ;;
- */cvs) rm -rf $afile/* ;;
- */dovecot) rm -f $afile/*/* ;;
- */cups) rm -f $afile/*/* ;;
- *) rm -f $afile/* ;;
- esac
- else
- rm -f $afile
- fi
-done
+# Clean up /var.
+rm -rf /var/lock/cvs/* /var/run/screen/*
+find /var/lock /var/run -type f -exec rm -f {} \;
rm -f /var/lib/rpm/__db* &> /dev/null
rm -f /var/gdm/.gdmfifo &> /dev/null