mirror of
https://github.com/dynup/kpatch
synced 2025-04-28 14:08:03 +00:00
Testing systemctl existence before executing it
Since commit c9614c4298
kpatch has support for upstart systems,
which means we should test the existence of `systemctl` before executing
it.
The command `command` is POSIX compliant, and should be widely
available.
Signed-of-by: Bruno Loreto <loretob@amazon.com>
This commit is contained in:
parent
19c7564242
commit
d33e1149d1
@ -469,7 +469,7 @@ case "$1" in
|
||||
echo "installing $PATCH ($KVER)"
|
||||
mkdir -p "$INSTALLDIR/$KVER" || die "failed to create install directory"
|
||||
cp -f "$PATCH" "$INSTALLDIR/$KVER" || die "failed to install module $PATCH"
|
||||
systemctl enable kpatch.service
|
||||
command -v systemctl > /dev/null 2>&1 && systemctl enable kpatch.service
|
||||
;;
|
||||
|
||||
"uninstall")
|
||||
|
Loading…
Reference in New Issue
Block a user