X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=filesystem%2Fusr%2Flocal%2Fbin%2Fmyupgrade;h=fb8d1d05643c05b9ffb87a13d96024a1de74ce14;hb=802e885e3e7fa3857f8bc4f54c261d5ca76f2454;hp=c206f8f7888127295a9e08864d616360122d2b12;hpb=2b981100a8b45f117d6f5c165404937f3c917e8f;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