mirror of
https://github.com/dynup/kpatch
synced 2024-12-18 11:24:33 +00:00
c9614c4298
Currently kpatch rely on systemd to load all kmods on startup. This patch aims to enable kpatch to be used on upstart systems. Limitations: With systemd, it would be possible to unload all modules by issuing: systemctl stop kpatch It was not possible to make a reasonable upstart's equivalent of it, so to unload the modules it will be necessary to call kpatch explicitly: kpatch unload --all I believe this it an non-issue, as it is still possible to unload the modules by calling kpatch explicitly. The file /etc/init/kpatch.conf will be installed unconditionally, and removed on uninstall. On my tests I have verified that all newly added files by this commit are also deleted on uninstall. It was also verified that applied patches are loaded again on startup. rpmlint does not complain about anything new. Signed-off-by: Bruno Loreto <loretob@amazon.com>
18 lines
401 B
Makefile
18 lines
401 B
Makefile
include ../Makefile.inc
|
|
|
|
all:
|
|
|
|
install: all
|
|
$(INSTALL) -d $(SYSTEMDDIR)
|
|
$(INSTALL) -m 0644 kpatch.service $(SYSTEMDDIR)
|
|
sed -i 's~PREFIX~$(PREFIX)~' $(SYSTEMDDIR)/kpatch.service
|
|
$(INSTALL) -d $(UPSTARTDIR)
|
|
$(INSTALL) -m 0644 kpatch.conf $(UPSTARTDIR)
|
|
sed -i 's~PREFIX~$(PREFIX)~' $(UPSTARTDIR)/kpatch.conf
|
|
|
|
uninstall:
|
|
$(RM) $(SYSTEMDDIR)/kpatch.service
|
|
$(RM) $(UPSTARTDIR)/kpatch.conf
|
|
|
|
clean:
|