From be1511b955b0441f0ae007896bc65d718c35b563 Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Tue, 27 Mar 2007 22:09:54 +0000 Subject: dell openmanagement ebuild from bug #113235 svn path=/; revision=92 --- app-admin/omsa/files/4.5/dellomsa-daemons | 148 ++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 app-admin/omsa/files/4.5/dellomsa-daemons (limited to 'app-admin/omsa/files/4.5/dellomsa-daemons') diff --git a/app-admin/omsa/files/4.5/dellomsa-daemons b/app-admin/omsa/files/4.5/dellomsa-daemons new file mode 100644 index 0000000..4684773 --- /dev/null +++ b/app-admin/omsa/files/4.5/dellomsa-daemons @@ -0,0 +1,148 @@ +#!/sbin/runscript +# +# dellomsa-daemons +# +# Dell OMSA daemons startup script +# +# This script takes care of starting OMSA daemons: +# - data engine +# - instrumentation (event syslog'ing) service +# - OM common services +# - racsvc +# - snmp service +# - omawsd (TODO, have to figure out how to get it working) +# + +BITS=32 +## Source any dependent configuration here and set variables +## +# omsad +. /etc/sysconfig/omsad.src +OMSAD=${PROGRAM_PATH}/${PROGRAM_BIN}${BITS} +# OMSAD doesn't create pid file +# This directory is needed for OMSA. It should contain libstdc++2 +# from Redhat. +RH_LIBS=${INSTALL_ROOT}/rh-libs + +# omawsd +. /etc/sysconfig/omawsd.src +OMAWSD=${INSTALL_ROOT}/iws/bin/linux/omaws${BITS} +# OMAWSD does create pid file, but TODO + + +DCSTORD=${INSTALL_ROOT}/dataeng/bin/dcstor${BITS}d +DCEVTD=${INSTALL_ROOT}/dataeng/bin/dcevt${BITS}d +DCSNMPD=${INSTALL_ROOT}/dataeng/bin/dcsnmp${BITS}d +#RACSVC=${INSTALL_ROOT}/rac/bin/racsvc + +# ...and the pid files +DCSTORD_PIDFILE=/var/run/dcstor${BITS}d.pid +DCEVTD_PIDFILE=/var/run/dcevt${BITS}d.pid +DCSNMPD_PIDFILE=/var/run/dcsnmp${BITS}d.pid +#RACSVC_PIDFILE=/var/run/.dracsvc + +#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${RH_LIBS}:${INSTALL_ROOT}/shared/bin/:${INSTALL_ROOT}/dataeng/bin/ + +depend() { + use logger net dellomsa-drivers +} + +checkconfig() { + if [ ! -d ${INSTALL_ROOT} ]; then + eerror "Directory ${INSTALL_ROOT} does not exist" + return 1 + fi + if [ ! -x ${DCSTORD} ]; then + eerror "File ${DCSTORD} does not exist" + return 1 + fi + if [ ! -x ${DCEVTD} ]; then + eerror "File ${DCEVTD} does not exist" + return 1 + fi + if [ ! -x ${INSTALL_ROOT}/omil/prereqcheck/sysreport ]; then + eerror "File ${INSTALL_ROOT}/omil/prereqcheck/sysreport does not exist" + return 1 + fi +} + +start(){ + checkconfig || return 1 + if ["${DATAENG_ENABLE}" =="yes" ]; then + + einfo "Starting Systems Management Data Engine" + ebegin "Starting dcstor${BITS}d" + start-stop-daemon --start --quiet --exec ${DCSTORD} \ + --pidfile ${DCSTORD_PIDFILE} + eend $? + + # start dcevt(32|64)d, but only if it's enabled + if [ "$EVENTD_ENABLED" == "yes" ]; then + ebegin "Starting dcevt${BITS}d" + start-stop-daemon --start --quiet --exec ${DCEVTD} \ + --pidfile ${DCEVTD_PIDFILE} + eend $? + fi + + # start dcsnmp(32|64)d, but only if it's enabled + if [ "${SNMP_ENABLED}" == "yes" ]; then + ebegin "Starting dcsnmp${BITS}d" + start-stop-daemon --start --quiet --exec ${DCSNMPD} \ + --pidfile ${DCSNMPD_PIDFILE} + eend $? + fi + + # start omsad(32|64), but only if it's enabled + if [ "${OMSAD_ENABLED}" == "yes" ]; then + ebegin "Starting OM Common Services" + start-stop-daemon --start --quiet --exec ${OMSAD} + eend $? + fi + + # start omawsd, but only if it's enabled + if [ "${OMAWSD_ENABLED}" == "yes" ]; then + ebegin "Starting Secure Port Server" + ${OMAWSD} -run + eend $? + fi + + + fi +} + +stop() { + if ["${DATAENG_ENABLE}" =="yes" ]; then + einfo "Stopping Systems Management Data Engine" + + if [ "${OMAWSD_ENABLED}" == "yes" ]; then + ebegin "Stopping Secure Port Server" + start-stop-daemon --stop --quiet --exec ${OMAWSD} + eend $? + fi + + if [ "${OMSAD_ENABLED}" == "yes" ]; then + ebegin "Stopping OM Common Services" + start-stop-daemon --stop --quiet --exec ${OMSAD} + eend $? + fi + + if [ "${SNMP_ENABLED}" == "yes" ]; then + ebegin "Stopping dcsnmp${BITS}d" + start-stop-daemon --stop --quiet --exec ${DCSNMPD} \ + --pidfile ${DCSNMPD_PIDFILE} + eend $? + fi + + if [ "$EVENTD_ENABLED" == "yes" ]; then + ebegin "Stopping dcevt${BITS}d" + start-stop-daemon --stop --quiet --exec ${DCEVTD} \ + --pidfile ${DCEVTD_PIDFILE} + eend $? + fi + + ebegin "Stopping dcstor${BITS}d" + start-stop-daemon --stop --quiet --exec ${DCSTORD} \ + --pidfile ${DCSTORD_PIDFILE} + eend $? + fi +} -- cgit v1.2.3-65-gdbad