summaryrefslogtreecommitdiffstats
path: root/scripts/cobblersyslogd
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-03-19 18:56:59 -0400
committerJim Meyering <jim@meyering.net>2007-03-19 18:56:59 -0400
commit6d6082d62d7e5fdc4014455a09316de9e36b6786 (patch)
treeaa484d1d2ed01f9fbcb39b372e9f26f7e35e67ba /scripts/cobblersyslogd
parent3797448bd957a39f43432d3399a5e2482cec533a (diff)
downloadcobbler-6d6082d62d7e5fdc4014455a09316de9e36b6786.tar.gz
cobbler-6d6082d62d7e5fdc4014455a09316de9e36b6786.tar.xz
cobbler-6d6082d62d7e5fdc4014455a09316de9e36b6786.zip
Most of these diffs come from directory reorg/cleanup, though the main feature here is the start of a better --import command that creates significantly shorter paths and can work more reliably on mounted DVD images (losetup or otherwise). Detection of kickstarts based on paths needs to be augmented by additional means for this to really work. However, changes going in here (and still more to come) result in cleaner names for imported profiles, and substantially shorter kernel option command lines, which is needed to keep under the 255 limit. There is also some work here going in to template out all of the files for PXE, reducing the amount of code in action_sync and also making PXE setups much more customizable (menu choices, titles, random parameters, ipappend 2, etc) without patching the source. "tree" on import is also attached now to the distro, not the profile. So, whew, that's a lot.
Diffstat (limited to 'scripts/cobblersyslogd')
-rwxr-xr-xscripts/cobblersyslogd92
1 files changed, 92 insertions, 0 deletions
diff --git a/scripts/cobblersyslogd b/scripts/cobblersyslogd
new file mode 100755
index 00000000..b8bc3f7f
--- /dev/null
+++ b/scripts/cobblersyslogd
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# cobblersyslogd Cobbler kickstart status monitor
+#
+# chkconfig: 345 99 99
+# description: This is a daemon which monitors and logs remote syslog traffic \
+# from machines being provisioned from cobbler. \
+# See http://cobbler.et.redhat.com
+#
+# processname: /usr/bin/cobbler_syslogd
+
+# Sanity checks.
+[ -x /usr/bin/cobbler_syslogd ] || exit 0
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+start() {
+ echo -n $"Starting cobbler remote syslog monitor: "
+ if test -f /var/lock/subsys/cobblersyslogd ; then
+ echo_failure
+ echo
+ return 1
+ fi
+ /usr/bin/cobbler_syslogd
+ RETVAL=$?
+ echo_success
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cobblersyslogd
+ return $RETVAL
+}
+
+
+stop() {
+ echo -n $"Stopping cobbler remote syslog monitor: "
+ if ! test -f /var/lock/subsys/cobblersyslogd ; then
+ echo_failure
+ echo
+ return 1
+ fi
+ pkill cobbler_syslogd
+ RETVAL=$?
+ rm /var/lock/subsys/cobblersyslogd
+ echo_success
+ echo
+ return $RETVAL
+}
+
+mystatus() {
+ if test -f /var/lock/subsys/cobblersyslogd ; then
+ echo "cobbbler_syslogd is running..."
+ return 0
+ fi
+ echo "cobbler_syslogd is stopped"
+ echo
+ return 0
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ mystatus
+ RETVAL=$?
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/cobblersyslogd ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ echo "can't reload configuration, you have to restart it"
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ ;;
+esac
+exit $RETVAL
+