From b38b96282fe7fb1a5945f8948ddceb0454b13584 Mon Sep 17 00:00:00 2001 From: mulhern Date: Sun, 3 Dec 2023 21:28:38 -0500 Subject: [PATCH] Parameterize /usr/libexec everywhere This step was done partially in a prior PR, this just completes that. See: https://github.com/stratis-storage/stratisd/pull/3064 Signed-off-by: mulhern --- Makefile | 4 ++-- dracut/90stratis/{module-setup.sh => module-setup.sh.in} | 4 ++-- .../{stratisd-min.service => stratisd-min.service.in} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename dracut/90stratis/{module-setup.sh => module-setup.sh.in} (94%) rename dracut/90stratis/{stratisd-min.service => stratisd-min.service.in} (82%) diff --git a/Makefile b/Makefile index a9f4d05510..2e257b7830 100644 --- a/Makefile +++ b/Makefile @@ -294,9 +294,9 @@ install-dbus-cfg: install-dracut-cfg: mkdir -p $(DESTDIR)$(DRACUTDIR)/modules.d $(INSTALL) -Dpm0755 -d $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis - $(INSTALL) -Dpm0755 -t $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis dracut/90stratis/module-setup.sh + sed 's|@LIBEXECDIR@|$(LIBEXECDIR)|' dracut/90stratis/stratisd-min.service.in > $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis/stratisd-min.service + sed 's|@LIBEXECDIR@|$(LIBEXECDIR)|' dracut/90stratis/module-setup.sh.in > $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis/module-setup.sh $(INSTALL) -Dpm0755 -t $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis dracut/90stratis/stratis-rootfs-setup - $(INSTALL) -Dpm0644 -t $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis dracut/90stratis/stratisd-min.service $(INSTALL) -Dpm0644 -t $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis dracut/90stratis/61-stratisd.rules $(INSTALL) -Dpm0755 -d $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis-clevis $(INSTALL) -Dpm0755 -t $(DESTDIR)$(DRACUTDIR)/modules.d/90stratis-clevis dracut/90stratis-clevis/module-setup.sh diff --git a/dracut/90stratis/module-setup.sh b/dracut/90stratis/module-setup.sh.in similarity index 94% rename from dracut/90stratis/module-setup.sh rename to dracut/90stratis/module-setup.sh.in index ac1ea37194..898709285f 100755 --- a/dracut/90stratis/module-setup.sh +++ b/dracut/90stratis/module-setup.sh.in @@ -3,7 +3,7 @@ # called by dracut check() { require_binaries stratis-min \ - /usr/libexec/stratisd-min \ + @LIBEXECDIR@/stratisd-min \ $systemdutildir/system-generators/stratis-setup-generator \ thin_check \ thin_repair \ @@ -34,7 +34,7 @@ installkernel() { install() { # Stratis dependencies inst_multiple stratis-min \ - /usr/libexec/stratisd-min \ + @LIBEXECDIR@/stratisd-min \ thin_check \ thin_repair \ mkfs.xfs \ diff --git a/dracut/90stratis/stratisd-min.service b/dracut/90stratis/stratisd-min.service.in similarity index 82% rename from dracut/90stratis/stratisd-min.service rename to dracut/90stratis/stratisd-min.service.in index 1a0b8d2892..0aa0a5f477 100644 --- a/dracut/90stratis/stratisd-min.service +++ b/dracut/90stratis/stratisd-min.service.in @@ -8,7 +8,7 @@ After=sysinit.target Type=notify Environment="RUST_BACKTRACE=1" ExecStartPre=-mkdir -p /run/cryptsetup -ExecStart=/usr/libexec/stratisd-min --log-level debug +ExecStart=@LIBEXECDIR@/stratisd-min --log-level debug KillSignal=SIGINT KillMode=process Restart=on-abort