use PREFIX for absolute path in service unit

Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
Seth Jennings 2015-06-03 08:47:14 -05:00
parent bfc088ff89
commit 743f70f002
2 changed files with 4 additions and 3 deletions

View File

@ -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:

View File

@ -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