iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixes, prometheus, lots of stuff
[distro-setup]
/
filesystem
/
usr
/
local
/
bin
/
myupgrade
diff --git
a/filesystem/usr/local/bin/myupgrade
b/filesystem/usr/local/bin/myupgrade
index c206f8f7888127295a9e08864d616360122d2b12..fb8d1d05643c05b9ffb87a13d96024a1de74ce14 100755
(executable)
--- a/
filesystem/usr/local/bin/myupgrade
+++ b/
filesystem/usr/local/bin/myupgrade
@@
-25,7
+25,7
@@
d() {
if [[ $DEBUG ]]; then
pee cat "wall -n"
else
if [[ $DEBUG ]]; then
pee cat "wall -n"
else
-
echo ok |
sed 's/^/myupgrade /' | pee logger "wall -n"
+ sed 's/^/myupgrade /' | pee logger "wall -n"
fi
}
myreboot() {
fi
}
myreboot() {
@@
-52,8
+52,9
@@
myreboot() {
# We should figure some workaround.
if ! out=$(/sbin/needrestart -p 2>&1); then
# We should figure some workaround.
if ! out=$(/sbin/needrestart -p 2>&1); then
- printf "%s\n\n" "$out"
- if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
+ if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+ needrestart -r l
+ else
myreboot
fi
fi
myreboot
fi
fi