3 # ggaoed This shell script takes care of starting and stopping ggaoed
5 # chkconfig: 2345 81 29
7 # description: ggaoed is an AoE (ATA over Ethernet) target implementation for Linux. \
8 # It utilizes Linux kernel AIO, memory mapped sockets and other Linux features \
9 # to provide the best performance.
11 # pidfile: /var/run/ggaoed.pid
12 # config: /etc/ggaoed.conf
15 # Source function library
16 . /etc/rc.d/init.d/functions
19 . /etc/sysconfig/network
22 [ -f /etc/sysconfig/ggaoed ] && . /etc/sysconfig/ggaoed
24 # Check that networking is up.
25 if is_yes "${NETWORKING}"; then
26 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then
27 msg_network_down ggaoed
35 # Check if the service is already running?
36 if [ ! -f /var/lock/subsys/ggaoed ]; then
38 daemon /usr/sbin/ggaoed $GGAOED_OPTS
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggaoed
42 msg_already_running ggaoed
47 if [ -f /var/lock/subsys/ggaoed ]; then
51 rm -f /var/lock/subsys/ggaoed >/dev/null 2>&1
53 msg_not_running ggaoed
58 if [ -f /var/lock/subsys/ggaoed ]; then
61 /usr/sbin/ggaoectl reload
63 [ $RETVAL -ne 0 ] && RETVAL=7
64 [ $RETVAL -eq 0 ] && ok || fail
66 msg_not_running ggaoed
77 if [ -f /var/lock/subsys/ggaoed ]; then
81 msg_not_running ggaoed
87 # See how we were called.
106 /usr/sbin/ggaoectl stats
110 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"