summaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/netfs4
-rwxr-xr-xrc.d/rc.sysinit29
2 files changed, 11 insertions, 22 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index 6769c132..1ad100bb 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -17,9 +17,6 @@
. /etc/init.d/functions
. /etc/sysconfig/network
-# Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
-
NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
SMBFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
CIFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
@@ -35,6 +32,7 @@ NETDEVMTAB=`LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab`
# See how we were called.
case "$1" in
start)
+ [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0
[ -n "$NFSFSTAB" ] &&
{
[ ! -f /var/lock/subsys/rpcbind ] && service rpcbind start
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 0f0a238b..5c0328ea 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -362,6 +362,13 @@ if [ -c /dev/mapper/control ]; then
fi
fi
+if [ -f /etc/crypttab ]; then
+ s=$"Starting disk encryption:"
+ echo "$s"
+ init_crypto 0 && success "$s" || failure "$s"
+ echo
+fi
+
if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then
fastboot=yes
fi
@@ -420,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
@@ -744,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 -L /var/lock /var/run ! -type d -exec rm -f {} \;
rm -f /var/lib/rpm/__db* &> /dev/null
rm -f /var/gdm/.gdmfifo &> /dev/null