Viitor_upstart/etc/init/mountfs.conf
kueller 9df088532e Neue erst versionen für den einsatz von upstart als std init prozess
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5506 504e572c-2e33-0410-9681-be2bf7408885
2010-04-20 12:58:29 +00:00

38 lines
1.1 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
echo -n "Remounting rootfs in rw mode..."
/bin/mount -n -o remount,rw /
evaluate_retval
echo >/etc/mtab
/bin/mount -f -o remount,rw /
/bin/rm -f /fastboot /forcefsck
echo -n "Activating swap..."
/sbin/swapon -a
evaluate_retval
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab`
if [ ! "$FILESYSTEM" == "nfs" ] \
&& [ ! "$FILESYSTEM" == "swap" ] \
&& [ ! "$MOUNTPOINT" == "/" ] \
&& [ ! "$DEVICE" == "none" ]; then
if [ -d $MOUNTPOINT ]; then
echo -n "Mounting $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
else
echo "Mountpoint $MOUNTPOINT not existing!"
fi
fi
done
end script