diff options
author | Dan Horák <dan@danny.cz> | 2025-02-03 19:55:09 +0100 |
---|---|---|
committer | Reza Arbab <arbab@linux.ibm.com> | 2025-02-26 08:31:27 -0600 |
commit | cce3a048302b1ed39c7415cbea45ec036162a47c (patch) | |
tree | 3362a6abc53984ad73e6b5e54c1cebe84af5756b | |
parent | 0b17fc206c2840c8b1a1a66a862c404f0762d054 (diff) | |
download | skiboot-cce3a048302b1ed39c7415cbea45ec036162a47c.zip skiboot-cce3a048302b1ed39c7415cbea45ec036162a47c.tar.gz skiboot-cce3a048302b1ed39c7415cbea45ec036162a47c.tar.bz2 |
external/opal-prd: generate path to opal-prd in its service file
Currently the path where to install the opal-prd binary is defined in
the Makefile by the $sbindir variable, but its service files hard-codes
the path to /usr/sbin/opal-prd. The build should generate the service
file based on the actual $sbindir value.
Also strip the trailing slash from the $prefix variable.
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
-rw-r--r-- | external/opal-prd/Makefile | 7 | ||||
-rw-r--r-- | external/opal-prd/opal-prd.service.in (renamed from external/opal-prd/opal-prd.service) | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/external/opal-prd/Makefile b/external/opal-prd/Makefile index fb9402f..c85aa3a 100644 --- a/external/opal-prd/Makefile +++ b/external/opal-prd/Makefile @@ -4,12 +4,12 @@ LDFLAGS += -m64 ASFLAGS = -m64 CPPFLAGS += -I. -I../../include -I../../ -prefix = /usr/local/ +prefix = /usr/local sbindir = $(prefix)/sbin datadir = $(prefix)/share mandir = $(datadir)/man -all: links arch_links | opal-prd +all: links arch_links | opal-prd opal-prd.service GET_ARCH = ../../external/common/get_arch.sh include ../../external/common/rules.mk @@ -51,6 +51,9 @@ version.c: ../../make_version.sh .version echo "const char version[] = \"$(OPAL_PRD_VERSION)\";" ;\ fi) > $@ +opal-prd.service: opal-prd.service.in + sed -e 's|@sbindir@|$(sbindir)|g' $< > $@ + .PHONY: VERSION-always .version: VERSION-always @echo $(OPAL_PRD_VERSION) > $@.tmp diff --git a/external/opal-prd/opal-prd.service b/external/opal-prd/opal-prd.service.in index dce0dd2..724e510 100644 --- a/external/opal-prd/opal-prd.service +++ b/external/opal-prd/opal-prd.service.in @@ -4,7 +4,7 @@ ConditionVirtualization=false ConditionPathExists=/sys/firmware/devicetree/base/ibm,opal/diagnostics [Service] -ExecStart=/usr/sbin/opal-prd +ExecStart=@sbindir@/opal-prd Restart=always [Install] |