- new.
authorPaweł Sikora <pluto@pld-linux.org>
Wed, 4 Aug 2010 12:20:04 +0000 (12:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ggaoed.init -> 1.1
    ggaoed.sysconfig -> 1.1

ggaoed.init [new file with mode: 0644]
ggaoed.sysconfig [new file with mode: 0644]

diff --git a/ggaoed.init b/ggaoed.init
new file mode 100644 (file)
index 0000000..29f0d4b
--- /dev/null
@@ -0,0 +1,114 @@
+#!/bin/sh
+#
+# ggaoed       This shell script takes care of starting and stopping ggaoed
+#
+# chkconfig:   2345 81 29
+#
+# description: ggaoed is an AoE (ATA over Ethernet) target implementation for Linux. \
+#              It utilizes Linux kernel AIO, memory mapped sockets and other Linux features \
+#              to provide the best performance.
+#
+# pidfile:     /var/run/ggaoed.pid
+# config:      /etc/ggaoed.conf
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/ggaoed.conf ] && . /etc/sysconfig/ggaoed.conf
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then
+               msg_network_down ggaoed
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/ggaoed ]; then
+               msg_starting ggaoed
+               daemon /usr/sbin/ggaoed $GGAOED_OPTS
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggaoed
+       else
+               msg_already_running ggaoed
+       fi
+}
+
+stop() {
+       if [ -f /var/lock/subsys/ggaoed ]; then
+               # Stop daemons.
+               msg_stopping ggaoed
+               killproc ggaoed
+               rm -f /var/lock/subsys/ggaoed >/dev/null 2>&1
+       else
+               msg_not_running ggaoed
+       fi
+}
+
+reload() {
+       if [ -f /var/lock/subsys/ggaoed ]; then
+               msg_reloading ggaoed
+               busy
+               ggaoectl reload
+               RETVAL=$?
+               [ $RETVAL -ne 0 ] && RETVAL=7
+               [ $RETVAL -eq 0 ] && ok || fail
+       else
+               msg_not_running ggaoed
+               exit 7
+       fi
+}
+
+restart() {
+       stop
+       start
+}
+
+condrestart() {
+       if [ -f /var/lock/subsys/ggaoed ]; then
+               stop
+               start
+       else
+               msg_not_running ggaoed
+               RETVAL=0
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       restart
+       ;;
+  try-restart)
+       condrestart
+       ;;
+  reload|force-reload)
+       reload
+       ;;
+  status)
+       status ggaoed
+       ggaoectl stats
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/ggaoed.sysconfig b/ggaoed.sysconfig
new file mode 100644 (file)
index 0000000..3d46dda
--- /dev/null
@@ -0,0 +1,4 @@
+# ggaoed startup configuration file
+
+# Try to define nice-level for running ggaoed
+SERVICE_RUN_NICE_LEVEL="+5"
This page took 0.045322 seconds and 4 git commands to generate.