SOURCES: conmand.init (NEW), conmand.sysconfig (NEW), conman.logro...

arekm arekm at pld-linux.org
Fri Jan 19 11:13:54 CET 2007


Author: arekm                        Date: Fri Jan 19 10:13:54 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   conmand.init (NONE -> 1.1)  (NEW), conmand.sysconfig (NONE -> 1.1)  (NEW), conman.logrotate (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/conmand.init
diff -u /dev/null SOURCES/conmand.init:1.1
--- /dev/null	Fri Jan 19 11:13:54 2007
+++ SOURCES/conmand.init	Fri Jan 19 11:13:48 2007
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# conman		conman (serial console server)
+#
+# chkconfig:	345 60 40
+#
+# description:	conman is a serial console server
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/conmand ] && . /etc/sysconfig/conmand
+
+# 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 conman
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/conmand ]; then
+		msg_starting conmand
+		daemon /usr/sbin/conmand
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/conmand
+	else
+		msg_already_running conmand
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/conmand ]; then
+		msg_stopping conmand
+		killproc conmand
+		rm -f /var/lock/subsys/conmand >/dev/null 2>&1
+	else
+		msg_not_running conmand
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status conmand
+	exit $?
+	;;
+  reload|force-reload)
+	if [ -f /var/lock/subsys/conmand ]; then
+		msg_reloading conmand
+		killproc conman -HUP
+		RETVAL=$?
+	else
+		msg_not_running conmand
+		exit 7
+	fi
+	;;
+  *)
+	msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}"
+	exit 3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/conmand.sysconfig
diff -u /dev/null SOURCES/conmand.sysconfig:1.1
--- /dev/null	Fri Jan 19 11:13:54 2007
+++ SOURCES/conmand.sysconfig	Fri Jan 19 11:13:48 2007
@@ -0,0 +1,4 @@
+# Customized setings for conmand
+
+# Define nice level for conmand
+SERVICE_RUN_NICE_LEVEL="+5"

================================================================
Index: SOURCES/conman.logrotate
diff -u /dev/null SOURCES/conman.logrotate:1.1
--- /dev/null	Fri Jan 19 11:13:54 2007
+++ SOURCES/conman.logrotate	Fri Jan 19 11:13:48 2007
@@ -0,0 +1,8 @@
+/var/log/conman/* {
+    olddir /var/log/archiv
+    create 640 root root
+    sharedscripts
+    postrotate
+        /bin/killall -HUP conmand
+    endscript
+}
================================================================


More information about the pld-cvs-commit mailing list