2008-05-03 17:03:02 +00:00
|
|
|
# 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
|
2010-01-28 13:58:15 +00:00
|
|
|
source /etc/event.d/functions
|
2008-05-03 17:03:02 +00:00
|
|
|
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
|
2010-01-28 13:58:15 +00:00
|
|
|
status_message "Mount nfs Filesystem on $MOUNTPOINT"
|
2008-05-03 17:03:02 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
end script
|
|
|
|
|
|
|
|
post-stop script
|
2010-01-28 13:58:15 +00:00
|
|
|
source /etc/event.d/functions
|
2008-05-03 17:03:02 +00:00
|
|
|
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
|
2010-01-28 13:58:15 +00:00
|
|
|
status_message "umount NFS Filesystem from $MOUNTPOINT"
|
2008-05-03 17:03:02 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
end script
|