2010-04-20 12:58:29 +00:00
|
|
|
description "Mounting all Filesystem not depending on Network"
|
|
|
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
|
|
|
version 1.0
|
|
|
|
emits none special
|
2008-05-03 17:03:02 +00:00
|
|
|
|
|
|
|
start on stopped checkfs
|
|
|
|
|
|
|
|
console output
|
2010-04-20 12:58:29 +00:00
|
|
|
script
|
|
|
|
source /etc/init/functions
|
2008-05-03 17:03:02 +00:00
|
|
|
/bin/mount -n -o remount,rw /
|
2010-05-01 08:58:40 +00:00
|
|
|
status_message "Remount of / to rw"
|
2008-05-03 17:03:02 +00:00
|
|
|
/bin/rm -f /fastboot /forcefsck
|
|
|
|
/sbin/swapon -a
|
2010-05-01 08:58:40 +00:00
|
|
|
status_message "Swap Aktivated"
|
2010-10-11 07:15:55 +00:00
|
|
|
POINTS=`sed -e "/^#/d" -e "/^$/d" /etc/fstab|\
|
|
|
|
awk '{if ( ( $2 != "/" ) && \
|
|
|
|
( $3 != "swap" ) && \
|
|
|
|
( $3 != "nfs" ) ) print $2 }'`
|
|
|
|
Do_Mount=1
|
|
|
|
FOUND=0
|
|
|
|
MP_DEPTH=1
|
|
|
|
while [ $Do_Mount -eq 1 ]; do
|
|
|
|
for i in $POINTS; do
|
|
|
|
DEPTH=`echo $i|awk -F"/" '{print NF-1}'`
|
|
|
|
if [ $DEPTH == $MP_DEPTH ]; then
|
|
|
|
if [ ! -d $i ]; then
|
|
|
|
mkdir -p $i
|
|
|
|
fi
|
|
|
|
mount $i &
|
|
|
|
status_message "Mount of $i"
|
|
|
|
FOUND=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
wait `pgrep /bin/mount`
|
|
|
|
if [ $FOUND -eq 0 ]; then
|
|
|
|
Do_Mount=0
|
|
|
|
else
|
|
|
|
FOUND=0
|
|
|
|
(( MP_DEPTH++ ))
|
2010-04-20 12:58:29 +00:00
|
|
|
fi
|
2008-05-03 17:03:02 +00:00
|
|
|
done
|
2010-10-04 17:03:03 +00:00
|
|
|
/sbin/ldconfig
|
2010-11-21 13:42:11 +00:00
|
|
|
if [ -f /var/run/utmp ]; then
|
|
|
|
cp /dev/null /var/run/utmp
|
|
|
|
fi
|
2008-05-03 17:03:02 +00:00
|
|
|
end script
|