packages: ggaoed/ggaoed.init (NEW), ggaoed/ggaoed.sysconfig (NEW) - new.

pluto pluto at pld-linux.org
Wed Aug 4 14:20:09 CEST 2010


Author: pluto                        Date: Wed Aug  4 12:20:09 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new.

---- Files affected:
packages/ggaoed:
   ggaoed.init (NONE -> 1.1)  (NEW), ggaoed.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ggaoed/ggaoed.init
diff -u /dev/null packages/ggaoed/ggaoed.init:1.1
--- /dev/null	Wed Aug  4 14:20:09 2010
+++ packages/ggaoed/ggaoed.init	Wed Aug  4 14:20:04 2010
@@ -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

================================================================
Index: packages/ggaoed/ggaoed.sysconfig
diff -u /dev/null packages/ggaoed/ggaoed.sysconfig:1.1
--- /dev/null	Wed Aug  4 14:20:09 2010
+++ packages/ggaoed/ggaoed.sysconfig	Wed Aug  4 14:20:04 2010
@@ -0,0 +1,4 @@
+# ggaoed startup configuration file
+
+# Try to define nice-level for running ggaoed
+SERVICE_RUN_NICE_LEVEL="+5"
================================================================


More information about the pld-cvs-commit mailing list