48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
|
description "Mounting all Filesystem not depending on Network"
|
||
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||
|
version 1.0
|
||
|
emits none special
|
||
|
|
||
|
start on stopped checkfs
|
||
|
|
||
|
console output
|
||
|
script
|
||
|
source /etc/init/functions
|
||
|
/bin/mount -n -o remount,rw /
|
||
|
status_message "Remount of / to rw"
|
||
|
/bin/rm -f /fastboot /forcefsck
|
||
|
/sbin/swapon -a
|
||
|
status_message "Swap Aktivated"
|
||
|
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++ ))
|
||
|
fi
|
||
|
done
|
||
|
/sbin/ldconfig
|
||
|
if [ -f /var/run/utmp ]; then
|
||
|
cp /dev/null /var/run/utmp
|
||
|
fi
|
||
|
end script
|