Newer
Older

Alberto LIVIO BECCARIA
committed
#!/bin/bash
# Keep the following services in proper shutdown order
# (Check with the start/stop numbers in the init file)
#
# NOTE: This seems to work. Moving netfs at the end does not work.
# If you modify this, test-test-test...
#SERVICES="rpcidmapd rpcgssd nfslock rpcbind"
SERVICES="nfs-idmapd rpc-gssd nfs-lock rpcbind"

Alberto LIVIO BECCARIA
committed
stop() {

Alberto LIVIO BECCARIA
committed
if [ ${ESAME_NFS} -eq 0 ]; then
sync
umount /home
for i in ${SERVICES}; do
service "$i" stop
done
fi
}
start() {
echo "STARTING ESAME-NFS"
if [ ${ESAME_NFS} -eq 1 ]; then
for i in ${SERVICES}; do
service "$i" start
done
mount /home
else
stop
fi

Alberto LIVIO BECCARIA
committed
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
*)
echo "Usage: $0 { start | stop | restart }";
exit 1;
;;
esac
exit 0