iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7020439
)
automatically reboot on services needsrestart doesnt handle
author
Ian Kelling
<ian@iankelling.org>
Wed, 16 Feb 2022 05:01:18 +0000
(
00:01
-0500)
committer
Ian Kelling
<ian@iankelling.org>
Wed, 16 Feb 2022 05:01:18 +0000
(
00:01
-0500)
filesystem/usr/local/bin/myupgrade
patch
|
blob
|
history
diff --git
a/filesystem/usr/local/bin/myupgrade
b/filesystem/usr/local/bin/myupgrade
index e5401dc836675ab54f9aafb31490ca5cf08ed7e7..ee1890f4415b72a42840d85eebdd3587d0718731 100755
(executable)
--- a/
filesystem/usr/local/bin/myupgrade
+++ b/
filesystem/usr/local/bin/myupgrade
@@
-38,16
+38,9
@@
myreboot() {
}
-if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
- ksta=$(needrestart -b | sed -n 's/NEEDRESTART-KSTA: *//p');
- case $ksta in
- 1) : ;;
- [023]) myreboot ;;
- *) err error: unknown kernel status ;;
- esac
-fi
-
-# needsrestarts automatic restarts failed.
if ! out=$(/sbin/needrestart -p 2>&1); then
e "$out"
+ if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
+ myreboot
+ fi
fi