X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=3772e87a3d189607c69ae4beebb0e3e9e2c92c61;hb=313bf2239f766a5a1d060133131b477478873ad7;hp=2bb61ed367bd8c623245fdb905151181ad3275b5;hpb=c578efcab3f35b96b1b3e4e7248f0fa24d815594;p=distro-setup diff --git a/distro-end b/distro-end index 2bb61ed..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 <~/.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