X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=filesystem%2Fusr%2Flocal%2Fbin%2Fmyupgrade;h=fb8d1d05643c05b9ffb87a13d96024a1de74ce14;hb=40dd151ec6ba75633c74568da59e35a45351f194;hp=c206f8f7888127295a9e08864d616360122d2b12;hpb=7e673f2615101982a17ffa0e23cb10b5b3803f07;p=distro-setup diff --git a/filesystem/usr/local/bin/myupgrade b/filesystem/usr/local/bin/myupgrade index c206f8f..fb8d1d0 100755 --- 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 - echo ok | sed 's/^/myupgrade /' | pee logger "wall -n" + sed 's/^/myupgrade /' | pee logger "wall -n" fi } myreboot() { @@ -52,8 +52,9 @@ myreboot() { # 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