X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=3772e87a3d189607c69ae4beebb0e3e9e2c92c61;hb=41235a1a070914920dc84f352abee00deccda146;hp=c97df5182dc131ebb983ce3802d4658a032e7e58;hpb=246e575caf357c06b97fc728cb78295ab3bd8630;p=distro-setup diff --git a/distro-end b/distro-end index c97df51..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 - echo "$0: $(date): ending now)" - exit 0 + end ;; esac ###### end website setup @@ -1670,7 +1681,6 @@ EOF fi -e "$end_msg_var" @@ -1684,11 +1694,4 @@ e "$end_msg_var" ######### begin stuff belonging at the end ########## -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 +end