SOURCES: pommed.init (NEW) - initial

shadzik shadzik at pld-linux.org
Thu Dec 20 18:59:48 CET 2007


Author: shadzik                      Date: Thu Dec 20 17:59:48 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- initial

---- Files affected:
SOURCES:
   pommed.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/pommed.init
diff -u /dev/null SOURCES/pommed.init:1.1
--- /dev/null	Thu Dec 20 18:59:48 2007
+++ SOURCES/pommed.init	Thu Dec 20 18:59:43 2007
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# chkconfig: 2345 88 12
+
+# We can't run without acpi:
+[ -e /proc/acpi ] || exit
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+start() {
+	msg_starting "Pommed: "
+	daemon /usr/sbin/pommed
+	touch /var/lock/subsys/pommed
+}
+
+stop() {
+	msg_stopping "Pommed: "
+	killproc pommed
+	RETVAL=$?
+	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/pommed
+}
+
+dostatus() {
+	status pommed
+	RETVAL=$?
+}
+
+restart() {
+	stop
+	start
+	RETVAL=$?
+}
+
+condrestart() {
+	[ -e /var/lock/subsys/pommed ] && restart || :
+}
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+	dostatus
+	;;
+  restart|reload)
+	restart
+	;;
+  condrestart)
+	condrestart
+	;;
+  *)
+	msg_usage "$0 {start|stop|status|restart|reload|condrestart}"
+	exit 1
+esac
+
+exit $RETVAL
================================================================


More information about the pld-cvs-commit mailing list