X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=3772e87a3d189607c69ae4beebb0e3e9e2c92c61;hb=f9ec6d39566c13775abd5d1709a44e5bd1c32997;hp=f66090b0e8976f9c413be6d34094999374353b71;hpb=7e4f3d0a6130b69b7f76a3ff13e510ffbeb1484b;p=distro-setup diff --git a/distro-end b/distro-end index f66090b..3772e87 100755 --- a/distro-end +++ b/distro-end @@ -27,6 +27,17 @@ end_msg() { IFS= read -r -d '' y ||: end_msg_var+="$y" } +end() { + e "$end_msg_var" + echo 0 >~/.local/distro-end + if $pending_reboot; then + echo "$0: pending reboot and then finished. doing it now." + s reboot now + else + echo "$0: $(date): ending now)" + fi + exit 0 +} die() { printf "$0: %s\n" "$*" >&2; exit 1 } @@ -53,7 +64,7 @@ s debconf-set-selections </dev/null <$t <$t <$t </dev/null <$t <$t <$t <~/.local/distro-end -if $pending_reboot; then - echo "$0: pending reboot and then finished. doing it now." - s reboot now -else - echo "$0: $(date): ending now)" -fi -exit 0 +end