[PVFS2-developers] Debian client startup script
Paul Gray
gray at cns.uni.edu
Wed Jul 21 10:54:37 EDT 2004
A Debian startup script is inlined below for client services. I symlinked
it to /etc/rcS.d/S45pvfs2-client, so that it starts up right after the
network is brought up. This has worked well for my systems, so perhaps
others running Debian might also find it useful.
"/etc/init.d/pvfs-client start" will load the pvfs2 module and start your
clients. "/etc/init.d/pvfs2-client stop" will unmount your pvfs2 mounts,
stop the clients, and unload the pvfs2 module. If there's interest in
my similar startup script for the server, let me know.
Change MODULE, DAEMON, PATH, and ARGS to reflect your local settings
(which could easilly be done via Makefile.in during the build).
----- begin pvfs2-client ------
#! /bin/sh
#
# Modified for Debian GNU/Linux by Paul Gray <gray at cs.uni.edu>.
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/sbin/pvfs2-client
MODULE=pvfs2
# Arguments to pvfs2-client
#
ARGS="pvfs2-client-core"
test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting pvfs2 client support: pvfs2-client"
modprobe -s $MODULE
start-stop-daemon --start --quiet --exec $DAEMON -- $ARGS
echo "."
;;
stop)
echo "Preparing to stop pvfs2 client support..."
echo "Unmounting pvfs2 partitions:"
for MOUNTPOINT in `mount | grep " type pvfs2 " | awk -F" on " '{print $2}' | cut -d\ -f1` ;
do
echo " ..now unmounting ${MOUNTPOINT}" ;
umount ${MOUNTPOINT} ;
done
echo -n "Stopping pvfs2 client support: pvfs2-client"
start-stop-daemon --stop --quiet --exec $DAEMON
sleep 2 # need time to free the module
modprobe -r $MODULE
echo "."
;;
reload)
echo "Not implemented."
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: /etc/init.d/atd {start|stop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0
---- end pvfs2-client -----
Paul Gray -o)
323 Wright Hall /\\
University of Northern Iowa _\_V
Message void if penguin violated ... Don't mess with the penguin
No one ever says "Hey, I can't read that ASCII e-mail ya sent me."
More information about the PVFS2-developers
mailing list