Merge "Fix failing mtce services on Debian"
This commit is contained in:
commit
1706e10f9a
13
mtce-control/debian/deb_folder/hbsAgent.service
Normal file
13
mtce-control/debian/deb_folder/hbsAgent.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Heartbeat Agent
|
||||
After=hbsClient.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/hbsAgent start
|
||||
ExecStop=/etc/init.d/hbsAgent stop
|
||||
PIDFile=/var/run/hbsAgent.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,4 +1,3 @@
|
||||
etc/init.d/goenabledControl
|
||||
etc/init.d/hbsAgent
|
||||
etc/pmon.d/hbsAgent.conf
|
||||
lib/systemd/system/hbsAgent.service
|
||||
|
@ -4,7 +4,6 @@
|
||||
export ROOT = debian/tmp
|
||||
export INITDIR = $(ROOT)/etc/init.d
|
||||
export PMONDIR = $(ROOT)/etc/pmon.d
|
||||
export SYSTEMDDIR = $(ROOT)/lib/systemd/system
|
||||
|
||||
%:
|
||||
dh $@
|
||||
@ -15,5 +14,6 @@ override_dh_auto_install:
|
||||
install -m 755 -p -D scripts/hbsAgent $(INITDIR)
|
||||
install -m 755 -d $(PMONDIR)
|
||||
install -m 644 -p -D scripts/hbsAgent.conf $(PMONDIR)
|
||||
install -m 755 -d $(SYSTEMDDIR)
|
||||
install -m 644 -p -D scripts/hbsAgent.service $(SYSTEMDDIR)
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd --name hbsAgent
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: Heartbeat Agent Daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="hbsAgent"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
|
||||
VIRT_TOOL='virt-what'
|
||||
|
23
mtce/debian/deb_folder/hbsClient.service
Normal file
23
mtce/debian/deb_folder/hbsClient.service
Normal file
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Heartbeat Client
|
||||
After=network.target syslog.service config.service
|
||||
Before=pmon.service mtcClient.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/hbsClient start
|
||||
ExecStop=/etc/init.d/hbsClient stop
|
||||
ExecReload=/etc/init.d/hbsClient reload
|
||||
PIDFile=/var/run/hbsClient.pid
|
||||
|
||||
# Failure handling
|
||||
TimeoutStartSec=10s
|
||||
TimeoutStopSec=10s
|
||||
|
||||
# process recovery is handled by pmond
|
||||
Restart=no
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
16
mtce/debian/deb_folder/hwmon.service
Normal file
16
mtce/debian/deb_folder/hwmon.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=StarlingX Hardware Monitor
|
||||
After=network.target syslog.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/hwmon start
|
||||
ExecStop=/etc/init.d/hwmon stop
|
||||
ExecReload=/etc/init.d/hwmon reload
|
||||
PIDFile=/var/run/hwmond.pid
|
||||
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
17
mtce/debian/deb_folder/lmon.service
Normal file
17
mtce/debian/deb_folder/lmon.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Starling-X Maintenance Link Monitor
|
||||
|
||||
After=config.service
|
||||
After=syslog-ng.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/lmon start
|
||||
ExecStop=/etc/init.d/lmon stop
|
||||
ExecReload=/etc/init.d/lmon reload
|
||||
PIDFile=/var/run/lmond.pid
|
||||
KillMode=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
14
mtce/debian/deb_folder/mtcalarm.service
Normal file
14
mtce/debian/deb_folder/mtcalarm.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Alarm Handler Client
|
||||
After=network.target syslog.service config.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/mtcalarm start
|
||||
ExecStop=/etc/init.d/mtcalarm stop
|
||||
ExecReload=/etc/init.d/mtcalarm reload
|
||||
PIDFile=/var/run/mtcalarmd.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,6 +1,5 @@
|
||||
etc/init.d/hwmon
|
||||
etc/logrotate.d/hwmon.logrotate
|
||||
etc/mtc/hwmond.conf
|
||||
lib/systemd/system/hwmon.service
|
||||
usr/lib/ocf/resource.d/platform/hwmon
|
||||
usr/bin/hwmond
|
||||
usr/lib/ocf/resource.d/platform/hwmon
|
||||
|
@ -2,5 +2,4 @@ etc/init.d/lmon
|
||||
etc/logrotate.d/lmon.logrotate
|
||||
etc/mtc/lmond.conf
|
||||
etc/pmon.d/lmon.conf
|
||||
lib/systemd/system/lmon.service
|
||||
usr/bin/lmond
|
||||
|
@ -2,10 +2,10 @@ etc/init.d/pmon
|
||||
etc/logrotate.d/pmon.logrotate
|
||||
etc/mtc/pmond.conf
|
||||
lib/systemd/system/pmon.service
|
||||
usr/bin/pmond
|
||||
usr/lib/libamon.so
|
||||
usr/lib/libamon.so.1
|
||||
usr/lib/libamon.so.1.0
|
||||
usr/bin/pmond
|
||||
usr/sbin/pmon-restart
|
||||
usr/sbin/pmon-start
|
||||
usr/sbin/pmon-stop
|
||||
|
@ -34,11 +34,8 @@ etc/syslog-ng/conf.d/mtce.conf
|
||||
lib/systemd/system/crashDumpMgr.service
|
||||
lib/systemd/system/fsmon.service
|
||||
lib/systemd/system/goenabled.service
|
||||
lib/systemd/system/hbsClient.service
|
||||
lib/systemd/system/mtcClient.service
|
||||
lib/systemd/system/mtcalarm.service
|
||||
lib/systemd/system/mtclog.service
|
||||
lib/systemd/system/runservices.service
|
||||
usr/lib/ocf/resource.d/platform/mtcAgent
|
||||
usr/bin/fsmond
|
||||
usr/bin/hbsAgent
|
||||
usr/bin/hbsClient
|
||||
@ -47,7 +44,6 @@ usr/bin/mtcClient
|
||||
usr/bin/mtcalarmd
|
||||
usr/bin/mtclogd
|
||||
usr/bin/wipedisk
|
||||
usr/lib/ocf/resource.d/platform/mtcAgent
|
||||
usr/sbin/dmemchk.sh
|
||||
usr/sbin/fsync
|
||||
usr/share/mtce/hwclock.service
|
||||
|
23
mtce/debian/deb_folder/mtclog.service
Normal file
23
mtce/debian/deb_folder/mtclog.service
Normal file
@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=StarlingX Maintenance Logger
|
||||
After=network.target syslog.service config.service
|
||||
Before=pmon.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/etc/init.d/mtclog start
|
||||
ExecStop=/etc/init.d/mtclog stop
|
||||
ExecReload=/etc/init.d/mtclog reload
|
||||
PIDFile=/var/run/mtclogd.pid
|
||||
|
||||
# Failure handling
|
||||
TimeoutStartSec=10s
|
||||
TimeoutStopSec=10s
|
||||
|
||||
# process recovery is handled by pmond
|
||||
Restart=no
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -91,17 +91,11 @@ override_dh_auto_install:
|
||||
# systemd service files
|
||||
install -m 755 -d $(UNITDIR)
|
||||
install -m 644 -p -D fsmon/scripts/fsmon.service $(UNITDIR)/fsmon.service
|
||||
install -m 644 -p -D hwmon/scripts/hwmon.service $(UNITDIR)/hwmon.service
|
||||
install -m 644 -p -D pmon/scripts/pmon.service $(UNITDIR)/pmon.service
|
||||
install -m 644 -p -D hostw/scripts/hostw.service $(UNITDIR)/hostw.service
|
||||
install -m 644 -p -D scripts/crashDumpMgr.service $(UNITDIR)/crashDumpMgr.service
|
||||
install -m 644 -p -D scripts/mtcClient.service $(UNITDIR)/mtcClient.service
|
||||
install -m 644 -p -D scripts/hbsClient.service $(UNITDIR)/hbsClient.service
|
||||
install -m 644 -p -D scripts/mtclog.service $(UNITDIR)/mtclog.service
|
||||
install -m 644 -p -D scripts/goenabled.service $(UNITDIR)/goenabled.service
|
||||
install -m 644 -p -D scripts/runservices.service $(UNITDIR)/runservices.service
|
||||
install -m 644 -p -D alarm/scripts/mtcalarm.service $(UNITDIR)/mtcalarm.service
|
||||
install -m 644 -p -D lmon/scripts/lmon.service $(UNITDIR)/lmon.service
|
||||
|
||||
# go enabled script
|
||||
install -m 755 -p -D scripts/goenabled $(INITDIR)/goenabled
|
||||
@ -162,5 +156,13 @@ override_dh_auto_install:
|
||||
install -m 755 -d $(ROOT)/var
|
||||
install -m 755 -d $(ROOT)/var/run
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd --name hbsClient
|
||||
dh_installsystemd --name hwmon
|
||||
dh_installsystemd --name lmon
|
||||
dh_installsystemd --name mtcalarm
|
||||
dh_installsystemd --name mtclog
|
||||
dh_installsystemd --name runservices
|
||||
|
||||
override_dh_usrlocal:
|
||||
echo "SKIPPING DH USRLOCAL"
|
||||
|
12
mtce/debian/deb_folder/runservices.service
Normal file
12
mtce/debian/deb_folder/runservices.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=StarlingX Run Host Services
|
||||
After=network.target syslog.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/etc/init.d/runservices start
|
||||
ExecStop=/etc/init.d/runservices stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -1,4 +1,4 @@
|
||||
etc/init.d/hostw
|
||||
etc/logrotate.d/hostw.logrotate
|
||||
etc/mtc/hostwd.conf
|
||||
usr/local/bin/hostwd
|
||||
usr/bin/hostwd
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: Maintenance Alarm Daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="mtcalarmd"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
PLATFORM_CONF="/etc/platform/platform.conf"
|
||||
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: hwmon daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="hwmond"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
|
||||
# Linux Standard Base (LSB) Error Codes
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: Link Monitor daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="lmond"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
IFACE=""
|
||||
|
||||
if [ ! -e "$DAEMON" ] ; then
|
||||
|
@ -17,10 +17,22 @@
|
||||
# Short-Description: Heartbeat Client Daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="hbsClient"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
IFACE=""
|
||||
|
||||
|
@ -19,10 +19,22 @@
|
||||
# Short-Description: mtclog daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
CENTOS_FUNCTIONS="/etc/init.d/functions"
|
||||
DEBIAN_FUNCTIONS="/lib/lsb/init-functions"
|
||||
if [ ! -f ${CENTOS_FUNCTIONS} ] ; then
|
||||
. ${DEBIAN_FUNCTIONS}
|
||||
else
|
||||
. ${CENTOS_FUNCTIONS}
|
||||
fi
|
||||
|
||||
DAEMON_NAME="mtclogd"
|
||||
DAEMON="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_CENTOS_PATH="/usr/local/bin/${DAEMON_NAME}"
|
||||
DAEMON_DEBIAN_PATH="/usr/bin/${DAEMON_NAME}"
|
||||
if [ ! -f ${DAEMON_CENTOS_PATH} ] ; then
|
||||
DAEMON=${DAEMON_DEBIAN_PATH}
|
||||
else
|
||||
DAEMON=${DAEMON_CENTOS_PATH}
|
||||
fi
|
||||
PIDFILE="/var/run/${DAEMON_NAME}.pid"
|
||||
PLATFORM_CONF="/etc/platform/platform.conf"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user