aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-04-15 12:55:37 -0400
committerBill Nottingham <notting@redhat.com>2008-04-15 12:55:37 -0400
commit9ffff0219cc67d20a1a006465b82fb73e2873dbb (patch)
treeeef09c87a967157749759560189bcc862352b286 /rc.d
parent2c92b1c09ab68926b9b4ecc72a85d92edf1590f1 (diff)
downloadinitscripts-9ffff0219cc67d20a1a006465b82fb73e2873dbb.tar
initscripts-9ffff0219cc67d20a1a006465b82fb73e2873dbb.tar.gz
initscripts-9ffff0219cc67d20a1a006465b82fb73e2873dbb.tar.bz2
initscripts-9ffff0219cc67d20a1a006465b82fb73e2873dbb.tar.xz
initscripts-9ffff0219cc67d20a1a006465b82fb73e2873dbb.zip
find is now in /bin. Use it. (#192991, #244941, #432818, #442178, #239914)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit22
1 files changed, 3 insertions, 19 deletions
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