Ausführung der Mounts pro Ebene parallelisiert (nicht mehr mit mount -a)

git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5835 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2010-10-11 07:15:55 +00:00
parent 1838f1085b
commit 8168820fa3

View File

@ -13,21 +13,32 @@ script
/bin/rm -f /fastboot /forcefsck /bin/rm -f /fastboot /forcefsck
/sbin/swapon -a /sbin/swapon -a
status_message "Swap Aktivated" status_message "Swap Aktivated"
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do POINTS=`sed -e "/^#/d" -e "/^$/d" /etc/fstab|\
MOUNTPOINT=$i awk '{if ( ( $2 != "/" ) && \
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab` ( $3 != "swap" ) && \
DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab` ( $3 != "nfs" ) ) print $2 }'`
if [ ! "$FILESYSTEM" == "nfs" ] \ Do_Mount=1
&& [ ! "$FILESYSTEM" == "swap" ] \ FOUND=0
&& [ ! "$MOUNTPOINT" == "/" ] \ MP_DEPTH=1
&& [ ! "$DEVICE" == "none" ]; then while [ $Do_Mount -eq 1 ]; do
if [ -d $MOUNTPOINT ]; then for i in $POINTS; do
mount $MOUNTPOINT DEPTH=`echo $i|awk -F"/" '{print NF-1}'`
status_message "Mount of $MOUNTPOINT" if [ $DEPTH == $MP_DEPTH ]; then
else if [ ! -d $i ]; then
echo -n "Mountpoint $MOUNTPOINT not existing!" 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 fi
fi
done done
/sbin/ldconfig /sbin/ldconfig
end script end script