diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2024-03-15 17:31:22 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2024-03-15 17:31:22 +0000 |
commit | c1076081f84a3e8e2710baee79fb732b414667fd (patch) | |
tree | 28f7f69e996bc81c2622399c5d34cd50dd047ed3 | |
parent | f230f4a0d91c911d88a052334ff2afa2ceafe0cc (diff) |
Backout "Move code into new stop_watchdog()"
An upgrade stalled on me, either my testing was flawed or my diff is...
Having stop_watchdog() is fine, but calling it in a different place has
is apparently too subtle for me to get right.
-rw-r--r-- | distrib/miniroot/install.sub | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 676334faf12..e0679456207 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1262 2024/03/15 16:29:32 kn Exp $ +# $OpenBSD: install.sub,v 1.1263 2024/03/15 17:31:21 kn Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -3477,6 +3477,11 @@ do_upgrade() { # Perform final steps common to both an install and an upgrade. finish_up + if [ -f /tmp/wdpid ]; then + kill -KILL "$(</tmp/wdpid)" 2>/dev/null + # do not bother waiting + rm -f /tmp/wdpid + fi } check_unattendedupgrade() { @@ -3523,15 +3528,6 @@ start_watchdog() { set +m } -# Stop the background timer. -stop_watchdog() { - if [ -f /tmp/wdpid ]; then - kill -KILL "$(</tmp/wdpid)" 2>/dev/null - # do not bother waiting - rm -f /tmp/wdpid - fi -} - # return if we only want internal functions [[ -n $FUNCS_ONLY ]] && return @@ -3712,8 +3708,6 @@ install) do_install;; upgrade) do_upgrade;; esac -$UU && stop_watchdog - # In case of autoinstall, this is a second process of install.sub. # Exiting here returns to the original process, which handles the # automatic reboot in do_autoinstall(). |