diff --git a/Makefile.inc b/Makefile.inc index be1adf0..4ea73cb 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -12,7 +12,6 @@ LIBEXECDIR = $(DESTDIR)$(PREFIX)/libexec/kpatch DATADIR = $(DESTDIR)$(PREFIX)/share/kpatch MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1 SYSTEMDDIR = $(DESTDIR)$(PREFIX)/lib/systemd/system -DRACUTDIR = $(DESTDIR)/usr/$(LIBDIR)/dracut/modules.d/99kpatch .PHONY: all install clean .DEFAULT: all diff --git a/contrib/kpatch.service b/contrib/kpatch.service index 06fbf10..405653e 100644 --- a/contrib/kpatch.service +++ b/contrib/kpatch.service @@ -3,7 +3,9 @@ Description="Apply kpatch kernel patches" [Service] Type=oneshot +RemainAfterExit=yes ExecStart=/usr/sbin/kpatch load --all +ExecStop=/usr/sbin/kpatch unload --all [Install] WantedBy=multi-user.target diff --git a/contrib/kpatch.spec b/contrib/kpatch.spec index 01a2a61..a292fc7 100644 --- a/contrib/kpatch.spec +++ b/contrib/kpatch.spec @@ -68,7 +68,7 @@ make %{_smp_mflags} %install rm -rf %{buildroot} -PREFIX=/usr make install DESTDIR=%{buildroot} +make install PREFIX=/%{_usr} DESTDIR=%{buildroot} %clean rm -rf %{buildroot}