diff --git a/utilities/pci-irq-affinity-agent/files/pci-irq-affinity-agent b/utilities/pci-irq-affinity-agent/files/pci-irq-affinity-agent index 600b3d894..71c2db2e5 100755 --- a/utilities/pci-irq-affinity-agent/files/pci-irq-affinity-agent +++ b/utilities/pci-irq-affinity-agent/files/pci-irq-affinity-agent @@ -14,21 +14,10 @@ source /etc/init.d/functions -PLATFORM_CONF="/etc/platform/platform.conf" -NODETYPE="" DAEMON_NAME="pci-irq-affinity-agent" AFFINITYAGENT="/usr/bin/${DAEMON_NAME}" - daemon_pidfile="/var/run/${DAEMON_NAME}.pid" -if [ -f ${PLATFORM_CONF} ] ; then - source ${PLATFORM_CONF} - NODETYPE=${nodetype} -else - logger "$0: ${PLATFORM_CONF} is missing" - exit 1 -fi - if [ ! -f "${AFFINITYAGENT}" ] ; then logger "$0: ${AFFINITYAGENT} is missing" exit 1 @@ -47,41 +36,37 @@ case "$1" in exit 1 fi - if [ ${NODETYPE} = "worker" ] ; then - echo -n "Setting up config for pci-irq-affinity-agent: " + echo -n "Setting up config for pci-irq-affinity-agent: " - if [ -e ${daemon_pidfile} ] ; then - echo "Killing existing process before starting new" - pid=`cat ${daemon_pidfile}` - kill -TERM $pid - rm -f ${daemon_pidfile} - fi + if [ -e ${daemon_pidfile} ] ; then + echo "Killing existing process before starting new" + pid=`cat ${daemon_pidfile}` + kill -TERM $pid + rm -f ${daemon_pidfile} + fi - echo -n "Starting pci-irq-affinity-agent: " - /bin/sh -c "${AFFINITYAGENT}"' >> /dev/null 2>&1 & echo $!' > ${daemon_pidfile} - RETVAL=$? - if [ $RETVAL -eq 0 ] ; then - echo "OK" - touch /var/lock/subsys/${DAEMON_NAME} - else - echo "FAIL" - fi + echo -n "Starting pci-irq-affinity-agent: " + /bin/sh -c "${AFFINITYAGENT}"' >> /dev/null 2>&1 & echo $!' > ${daemon_pidfile} + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + echo "OK" + touch /var/lock/subsys/${DAEMON_NAME} + else + echo "FAIL" fi ;; stop) - if [ ${NODETYPE} = "worker" ] ; then - echo -n "Stopping pci-irq-affinity-agent: " + echo -n "Stopping pci-irq-affinity-agent: " - if [ -e ${daemon_pidfile} ] ; then - pid=`cat ${daemon_pidfile}` - kill -TERM $pid - rm -f ${daemon_pidfile} - rm -f /var/lock/subsys/${DAEMON_NAME} - echo "OK" - else - echo "FAIL" - fi + if [ -e ${daemon_pidfile} ] ; then + pid=`cat ${daemon_pidfile}` + kill -TERM $pid + rm -f ${daemon_pidfile} + rm -f /var/lock/subsys/${DAEMON_NAME} + echo "OK" + else + echo "FAIL" fi ;;