kpatch/contrib/kpatch.service
Evgenii Shatokhin 20eddbac0c contrib/service: allow to turn the service off at boot time
It may be convenient to be able to turn off the automatic loading of
the patches that kpatch.service does. This helps, for example, if a
buggy patch is installed and crashes the system at boot.

This commit allows to specify kpatch.enable=0 in the kernel command
line. In this case, the binary patches will not be loaded automatically,
and the users should be able to remove or replace the offending patches
after the system boots.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2016-04-04 16:52:40 +03:00

13 lines
256 B
Desktop File

[Unit]
Description="Apply kpatch kernel patches"
ConditionKernelCommandLine=!kpatch.enable=0
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=PREFIX/sbin/kpatch load --all
ExecStop=PREFIX/sbin/kpatch unload --all
[Install]
WantedBy=multi-user.target