Move mdadm_env.sh out of /usr/lib/systemd
PATCH 1/1 Move mdadm_env.sh out of /usr/lib/systemd
The systemd developers like to keep control of the lib/systemd namespace, and haven't approved of the use of lib/systemd/scripts. So we should stop using it.
Move the mdadm_env.sh script, optionally sourced by mdmonitor.service, to a new directory /usr/lib/mdadm.
Signed-off-by NeilBrown <[email protected]>
--- Makefile | 3 ++- systemd/mdmonitor.service | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
Makefile +2 -1
@@ -85,6 +85,7 @@ MDMON_DIR = $(RUN_DIR) # place for autoreplace cookies FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots SYSTEMD_DIR=/lib/systemd/system +LIB_DIR=/usr/libexec/mdadm COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
@@ -280,7 +281,7 @@ install-systemd: systemd/[email protected] $(INSTALL) -D -m 755 .install.tmp.3 $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \ rm -f .install.tmp.3; \ done - if [ -f /etc/SuSE-release -o -n "$(SUSE)" ] ;then $(INSTALL) -D -m 755 systemd/SUSE-mdadm_env.sh $(DESTDIR)$(SYSTEMD_DIR)/../scripts/mdadm_env.sh ;fi + if [ -f /etc/SuSE-release -o -n "$(SUSE)" ] ;then $(INSTALL) -D -m 755 systemd/SUSE-mdadm_env.sh $(DESTDIR)$(LIB_DIR)/mdadm_env.sh ;fi uninstall: rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
systemd/mdmonitor.service +1 -1
@@ -12,5 +12,5 @@ DefaultDependencies=no [Service] Environment= MDADM_MONITOR_ARGS=--scan EnvironmentFile=-/run/sysconfig/mdadm -ExecStartPre=-/usr/lib/systemd/scripts/mdadm_env.sh +ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
Signature · 1 line
2.14.0.rc0.dirty
Jes Sorensen
AppliedQuoted 9 lines · NeilBrown
The systemd developers like to keep control of the lib/systemd namespace, and haven't approved of the use of
lib/systemd/scripts. So we should stop using it.Move the
mdadm_env.shscript, optionally sourced by mdmonitor.service, to a new directory/usr/lib/mdadm.Signed-off-by NeilBrown <[email protected]>
Applied!
Thanks,
Jes