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