Viitor_upstart/etc/init/mountnfs
kueller 061ddf553e IN neuer Upstart version liegen die Scripte unter init, und nicht mehr
unter event.d



git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5503 504e572c-2e33-0410-9681-be2bf7408885
2010-04-20 12:47:00 +00:00

34 lines
909 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/event.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
mount $MOUNTPOINT
status_message "Mount nfs Filesystem on $MOUNTPOINT"
fi
done
end script
post-stop script
source /etc/event.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
umount $MOUNTPOINT
status_message "umount NFS Filesystem from $MOUNTPOINT"
fi
done
end script