From 4b516a30180aabc31e899de1721f761bbbe6973f Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Tue, 1 May 2018 11:12:53 +0200 Subject: [PATCH] Remove mxstartup.systemd mxstartup-systemd.service starts systemd units identified by a specific filename pattern in /etc/systemd mxstartup-HOSTNAME-NAME.service We decided to get rid of this mechanism and start host specific service units from /etc/mxstartup instead. The file format of /etc/mxstartup has been expanded to enable this in #4. The last units which used this mechanism have been converted [1]. Remove files supporting the obsoleted mechanism. [1] https://github.molgen.mpg.de/mariux64/mxtools/commit/c907786cf1a2bffd060f3cf8ee8352d9c6095163 --- Makefile | 2 -- mxstartup-systemd.service | 14 -------------- mxstartup.systemd | 39 --------------------------------------- 3 files changed, 55 deletions(-) delete mode 100644 mxstartup-systemd.service delete mode 100755 mxstartup.systemd diff --git a/Makefile b/Makefile index be1599a..16dad41 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,8 @@ install: mkdir -p -m 0755 ${DESTDIR}${SYSTEMDSYSTEMDIR} install -m 0644 mxstartup-mxvip.service ${DESTDIR}${SYSTEMDSYSTEMDIR} install -m 0644 mxstartup-classic.service ${DESTDIR}${SYSTEMDSYSTEMDIR} - install -m 0644 mxstartup-systemd.service ${DESTDIR}${SYSTEMDSYSTEMDIR} mkdir -p -m 0755 ${DESTDIR}${SBINDIR} install -m 0755 mxstartup2mxconfig ${DESTDIR}${SBINDIR} install -m 0755 mxvipctl ${DESTDIR}${SBINDIR} install -m 0755 mxservicectl ${DESTDIR}${SBINDIR} install -m 0755 mxstartupctl ${DESTDIR}${SBINDIR} - install -m 0755 mxstartup.systemd ${DESTDIR}${SBINDIR} diff --git a/mxstartup-systemd.service b/mxstartup-systemd.service deleted file mode 100644 index f5fcec8..0000000 --- a/mxstartup-systemd.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Mariux mxstartup systemd -After=mxstartup-mxvip.service mxmount.service -Requires=mxstartup-mxvip.service mxmount.service - -[Service] -Type=oneshot -ExecStart=/usr/sbin/mxstartup.systemd start -ExecStop=/usr/sbin/mxstartup.systemd stop -RemainAfterExit=yes -StandardOutput=syslog - -[Install] -WantedBy=multi-user.target diff --git a/mxstartup.systemd b/mxstartup.systemd deleted file mode 100755 index e482de7..0000000 --- a/mxstartup.systemd +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -#set -x - -dnsdomain=molgen.mpg.de -systemdsystemdir=/etc/systemd/system -mxstartupprefix=mxstartup -unittype=.service - -hostname=$(uname -n) -shorthostname=${hostname%\.${dnsdomain}} - -searchunits=${systemdsystemdir}/${mxstartupprefix}-${shorthostname}-*${unittype} - -units= - - -shopt -s nullglob - -for i in ${searchunits} ; do - units="${units+${units} }${i##*/}" -done - - -if [ -z "${units}" ] ; then - echo >&2 "mxstartup: nothing to start on host '${shorthostname}'" - exit 0 -fi - - - -cmd=status - -if [ "${1}" = "start" -o "${1}" = "stop" ] ; then - cmd=${1} -fi - -exec systemctl ${cmd} ${units} -