From 743f70f0021b66a544b6132542a7c31edb37bd5c Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Wed, 3 Jun 2015 08:47:14 -0500 Subject: [PATCH] use PREFIX for absolute path in service unit Signed-off-by: Seth Jennings --- contrib/Makefile | 3 ++- contrib/kpatch.service | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/Makefile b/contrib/Makefile index bc490e8..cb8728e 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -5,8 +5,9 @@ all: install: all $(INSTALL) -d $(SYSTEMDDIR) $(INSTALL) kpatch.service $(SYSTEMDDIR) + sed -i 's~PREFIX~$(PREFIX)~' $(SYSTEMDDIR)/kpatch.service uninstall: - $(RM) -f $(SYSTEMDDIR)/kpatch.service + $(RM) $(SYSTEMDDIR)/kpatch.service clean: diff --git a/contrib/kpatch.service b/contrib/kpatch.service index 405653e..9f81838 100644 --- a/contrib/kpatch.service +++ b/contrib/kpatch.service @@ -4,8 +4,8 @@ Description="Apply kpatch kernel patches" [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/sbin/kpatch load --all -ExecStop=/usr/sbin/kpatch unload --all +ExecStart=PREFIX/sbin/kpatch load --all +ExecStop=PREFIX/sbin/kpatch unload --all [Install] WantedBy=multi-user.target