File: kpatch.conf

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (29 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

# This upstart version lacks the ability of unloading modules with
# the "stop" directive, as upstart does not support a feature like
# systemd's RemainAfterExit option.


description "Apply kpatch kernel patches"

start on runlevel [2345] # Roughly equivalent to multi-user.target

# We are not a daemon
task

# Emulating systemd's ConditionKernelCommandLine option.
pre-start script
    if [[ -e /proc/cmdline ]]
    then
        grep -q "kpatch.enable=0" /proc/cmdline && exit 1
    else
        dmesg | grep -q "Command line.*kpatch.enable=0" && exit 1
    fi

    exit 0
end script

# Main process (start)
exec PREFIX/sbin/kpatch load --all