X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=3772e87a3d189607c69ae4beebb0e3e9e2c92c61;hb=f9ec6d39566c13775abd5d1709a44e5bd1c32997;hp=6c0f446642d15916512a929ce22caad4ef9a71f2;hpb=f5bedaabc8ab8e0fa29238b70ab66bd7d37095d1;p=distro-setup diff --git a/distro-end b/distro-end index 6c0f446..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 <$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