iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix root mail on bk, nonroot stuff, misc prom updates
[distro-setup]
/
filesystem
/
usr
/
local
/
bin
/
myupgrade
diff --git
a/filesystem/usr/local/bin/myupgrade
b/filesystem/usr/local/bin/myupgrade
index ee1890f4415b72a42840d85eebdd3587d0718731..3577864d76363fbbb71ba0fd1f81850a286b217e 100755
(executable)
--- a/
filesystem/usr/local/bin/myupgrade
+++ b/
filesystem/usr/local/bin/myupgrade
@@
-38,8
+38,12
@@
myreboot() {
}
}
+# TODO: executed from cron, this doesnt sent an email when we reboot,
+# because rebooting from the script stops the ability to send email.
+# We should figure some workaround.
+
if ! out=$(/sbin/needrestart -p 2>&1); then
if ! out=$(/sbin/needrestart -p 2>&1); then
-
e
"$out"
+
printf "%s\n\n"
"$out"
if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
myreboot
fi
if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
myreboot
fi