Viitor_upstart/etc/event.d/mountnfs
kueller 7b7f6e837b V961 Tree Umbau
git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_upstart@4329 504e572c-2e33-0410-9681-be2bf7408885
2008-05-03 16:59:18 +00:00

36 lines
921 B
Plaintext

# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started nfsclient
stop on stopping nfsclient
console output
pre-start script
source /etc/init.d/functions
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
if [ "$FILESYSTEM" == "nfs" ]; then
echo -n "Mounting nfs $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
fi
done
end script
post-stop script
source /etc/init.d/functions
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
if [ "$FILESYSTEM" == "nfs" ]; then
echo -n "Mounting nfs $MOUNTPOINT"
umount $MOUNTPOINT
evaluate_retval
fi
done
end script