From nobody Thu Sep 21 07:51:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rrnfj01LSz4tk0X; Thu, 21 Sep 2023 07:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rrnfh6ZjGz4JS9; Thu, 21 Sep 2023 07:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695282716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nx4snmfbGb0a5S1eoULGo0LnEHFRVTDcZ4L3Ca7y/MQ=; b=kppJOmKcTzi8Eee/MZpAx/5dF32C2t+LoS9n7f8FPfAcR1UhPxiPJ6JJY807PBdSlFG7vW AAhxWQRgYsvmIjsCmqhGxarYj53iQIzSLc6JcdYbHNwi40SdoyEjmlnReNfhD1GW3QoZcl v41NdmMYWsUnX3FDm99D/R8RBGa6w7utK8q08OA3tVYhCKNI6nDNRyIOnoM2I11wCcwSez 24HLBnIQdxYPgR6k3qGyvewE9RKn1/Rp9mqNKEp0s8LEptD56DG36v771YxxCCF5/ycdgD rnCf1znlagKoC7xZrdvzV8rLf9tCJMuMe3R91ReA+HH4hdDud7QfzA0Ike5JKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695282716; a=rsa-sha256; cv=none; b=ADc/tiwbuTixaEQc1r93ArUmnJoqo4HqzeU11DloDtcn1IOGiqF6yoTpXfe++DBzrEChWr D2eW3SGr9VOtEpjfXXxXvBiiqxU4OTGkg5XSL+kjdzbJzXEVN2dwz0MzY9rICJEkinjf1w /ge3fbMrg5z8oJ87T/XRkLr6Vv+im4M03dCvuu4IpUr+P3buYB7syuF4GHrom3qxMzeH1C eQ00gjYjwaIr5d96ytxED1sBspYvpwmGC6DnyMBS1tQEU0Pni24Sx8o2uTPLubALvvOubq EumWXBZjo5/9HkhhYzNLx9n9RCmcILioR0Dz0SvRHV6TDJgh2Z0/UczDoQDpnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695282716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nx4snmfbGb0a5S1eoULGo0LnEHFRVTDcZ4L3Ca7y/MQ=; b=myTw4YshS/ghz2RHvhNRGqQiyWIvwD7KcV+Bz+UvDwn3KUida2ml+E9EsppAVCvzBzMveN XakwyYlmtKmBvwbrRlD3tgij/rTHG+nwfvC9/ZjuyO+Iop423AA+Fyu/4mj+g+AouwaZ6j 1lLTu+KtBBHC7+X1VAQcATndP9RntTuZ9+OapGU9drBPE1NfdiAZPB7jW+qcUvUaUoYpmx bfYFoT59C0NdKDach0r6SH3gXB9i944NoCd9pfq30nDPmhjNeHWqrOZoOEuphUp9unnjko ia2GR+wR8UkgxmWXWpe0wPbKMfaEbedg9V0D34yhayXylE9DYW/r8neCOvxckQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rrnfh5fPNzWMn; Thu, 21 Sep 2023 07:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38L7puEH039534; Thu, 21 Sep 2023 07:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38L7puQi039531; Thu, 21 Sep 2023 07:51:56 GMT (envelope-from git) Date: Thu, 21 Sep 2023 07:51:56 GMT Message-Id: <202309210751.38L7puQi039531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: c0e249d32c78 - main - bsdinstall: avoid conflicts with fd 3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0e249d32c780ee8240fe8b3b8144078a8eec41f Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e249d32c780ee8240fe8b3b8144078a8eec41f commit c0e249d32c780ee8240fe8b3b8144078a8eec41f Author: Lars Kellogg-Stedman AuthorDate: 2023-08-15 15:44:02 +0000 Commit: Corvin Köhne CommitDate: 2023-09-21 06:41:48 +0000 bsdinstall: avoid conflicts with fd 3 Throughout the bsdinstall script fd 3 is used by f_dprintf (set through $TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts, we use fd 3 to juggle stdout when calling out to other tools, which can cause the installer to fail with a "Bad file descriptor" error when f_dprintf attempts to use it. This commit replaces all constructs like this: exec 3>&1 SOME_VARIABLE=$(some command 2>&1 1>&3) exec 3>&- With: exec 5>&1 SOME_VARIABLE=$(some command 2>&1 1>&5) exec 5>&- PR: 273148 Reviewed by: corvink Fixes: 1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors") MFC after: 1 week --- usr.sbin/bsdinstall/scripts/auto | 22 +++++++++++----------- usr.sbin/bsdinstall/scripts/fetchmissingdists | 6 +++--- usr.sbin/bsdinstall/scripts/hardening | 6 +++--- usr.sbin/bsdinstall/scripts/jail | 16 ++++++++-------- usr.sbin/bsdinstall/scripts/mirrorselect | 12 ++++++------ usr.sbin/bsdinstall/scripts/netconfig | 12 ++++++------ usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 6 +++--- usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 6 +++--- usr.sbin/bsdinstall/scripts/script | 13 ++++++------- usr.sbin/bsdinstall/scripts/services | 6 +++--- usr.sbin/bsdinstall/scripts/time | 12 ++++++------ 11 files changed, 58 insertions(+), 59 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index fd5b634696ae..95084f1bdcc3 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -159,13 +159,13 @@ if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then DISTMENU="$(echo ${DISTMENU} | sed -E 's/\.txz//g')" if [ -n "$DISTMENU" ]; then - exec 3>&1 + exec 5>&1 EXTRA_DISTS=$( eval dialog \ --backtitle \"$OSNAME Installer\" \ --title \"Distribution Select\" --nocancel --separate-output \ --checklist \"Choose optional system components to install:\" \ 0 0 0 $DISTMENU \ - 2>&1 1>&3 ) + 2>&1 1>&5 ) for dist in $EXTRA_DISTS; do export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" done @@ -301,13 +301,13 @@ case $CURARCH in ;; esac -exec 3>&1 +exec 5>&1 PARTMODE=`echo $PMODES | xargs dialog --backtitle "$OSNAME Installer" \ --title "Partitioning" \ --item-help \ --menu "How would you like to partition your disk?" \ - 0 0 0 2>&1 1>&3` || exit 1 -exec 3>&- + 0 0 0 2>&1 1>&5` || exit 1 +exec 5>&- case "$PARTMODE" in "$msg_auto_zfs") # ZFS @@ -340,10 +340,10 @@ esac [ -f /usr/libexec/bsdinstall/local.pre-fetch ] && f_dprintf "Running local.pre-fetch" && sh /usr/libexec/bsdinstall/local.pre-fetch "$BSDINSTALL_CHROOT" if [ -n "$FETCH_DISTRIBUTIONS" ]; then - exec 3>&1 - export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&3) + exec 5>&1 + export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&5) FETCH_RESULT=$? - exec 3>&- + exec 5>&- [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions" fi @@ -371,7 +371,7 @@ fi bsdinstall adduser finalconfig() { - exec 3>&1 + exec 5>&1 REVISIT=$(dialog --backtitle "$OSNAME Installer" \ --title "Final Configuration" --no-cancel --menu \ "Setup of your $OSNAME system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ @@ -383,8 +383,8 @@ finalconfig() { "Services" "Set daemons to run on startup" \ "System Hardening" "Set security options" \ "Time Zone" "Set system timezone" \ - "Handbook" "Install $OSNAME Handbook (requires network)" 2>&1 1>&3) - exec 3>&- + "Handbook" "Install $OSNAME Handbook (requires network)" 2>&1 1>&5) + exec 5>&- case "$REVISIT" in "Add User") diff --git a/usr.sbin/bsdinstall/scripts/fetchmissingdists b/usr.sbin/bsdinstall/scripts/fetchmissingdists index a1ce9e4e0ca5..d37acc96b92c 100644 --- a/usr.sbin/bsdinstall/scripts/fetchmissingdists +++ b/usr.sbin/bsdinstall/scripts/fetchmissingdists @@ -61,10 +61,10 @@ BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist" mkdir -p "$BSDINSTALL_FETCHDEST" || error "Could not create directory $BSDINSTALL_FETCHDEST" if [ -z "$BSDINSTALL_DISTSITE" ]; then - exec 3>&1 - BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) + exec 5>&1 + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5) MIRROR_BUTTON=$? - exec 3>&- + exec 5>&- test $MIRROR_BUTTON -eq 0 || error "No mirror selected" export BSDINSTALL_DISTSITE fi diff --git a/usr.sbin/bsdinstall/scripts/hardening b/usr.sbin/bsdinstall/scripts/hardening index b9e259ff1a13..a77fcdeaf540 100755 --- a/usr.sbin/bsdinstall/scripts/hardening +++ b/usr.sbin/bsdinstall/scripts/hardening @@ -34,7 +34,7 @@ echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening echo -n > $BSDINSTALL_TMPETC/sysctl.conf.hardening echo -n > $BSDINSTALL_TMPBOOT/loader.conf.hardening -exec 3>&1 +exec 5>&1 FEATURES=$( bsddialog --backtitle "$OSNAME Installer" \ --title "System Hardening" --nocancel --separate-output \ --checklist "Choose system security hardening options:" \ @@ -49,9 +49,9 @@ FEATURES=$( bsddialog --backtitle "$OSNAME Installer" \ "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ "8 secure_console" "Enable console password prompt" ${secure_console:-off} \ "9 disable_ddtrace" "Disallow DTrace destructive-mode" ${disable_ddtrace:-off} \ -2>&1 1>&3 ) +2>&1 1>&5 ) retval=$? -exec 3>&- +exec 5>&- if [ $retval -ne $BSDDIALOG_OK ]; then exit 1 diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index e5822087e97b..ab095f44ba39 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -66,10 +66,10 @@ fi test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then - exec 3>&1 - BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) + exec 5>&1 + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5) MIRROR_BUTTON=$? - exec 3>&- + exec 5>&- test $MIRROR_BUTTON -eq 0 || error "No mirror selected" export BSDINSTALL_DISTSITE fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST" @@ -81,13 +81,13 @@ if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then if [ ! "$nonInteractive" == "YES" ] then - exec 3>&1 + exec 5>&1 EXTRA_DISTS=$(echo $DISTMENU | xargs -o bsddialog \ --backtitle "$OSNAME Installer" \ --title "Distribution Select" --no-cancel --separate-output \ --checklist "Choose optional system components to install:" \ 0 0 0 \ - 2>&1 1>&3) + 2>&1 1>&5) for dist in $EXTRA_DISTS; do export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" done @@ -103,10 +103,10 @@ done FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then - exec 3>&1 - BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3) + exec 5>&1 + BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&5) MIRROR_BUTTON=$? - exec 3>&- + exec 5>&- test $MIRROR_BUTTON -eq 0 || error "No mirror selected" export BSDINSTALL_DISTSITE fi diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index 82a726c009b6..901f816206ba 100755 --- a/usr.sbin/bsdinstall/scripts/mirrorselect +++ b/usr.sbin/bsdinstall/scripts/mirrorselect @@ -35,7 +35,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" : ${BSDDIALOG_ESC=5} : ${BSDDIALOG_ERROR=255} -exec 3>&1 +exec 5>&1 MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ --title "Mirror Selection" --extra-button --extra-label "Other" \ --menu "Please select the best suitable site for you or \"other\" if you want to specify a different choice. The \"Main Site\" directs users to the nearest project managed mirror via GeoDNS (they carry the full range of possible distributions and support both IPv4 and IPv6). All other sites are known as \"Community Mirrors\"; not every site listed here carries more than the base distribution kits. Select a site!" \ @@ -88,9 +88,9 @@ MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ ftp://ftp5.us.freebsd.org "USA #5 - IPv6"\ ftp://ftp11.us.freebsd.org "USA #11 - IPv6"\ ftp://ftp14.us.freebsd.org "USA #14"\ - 2>&1 1>&3` + 2>&1 1>&5` MIRROR_BUTTON=$? -exec 3>&- +exec 5>&- _UNAME_R=`uname -r` _UNAME_R=${_UNAME_R%-p*} @@ -113,13 +113,13 @@ $BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC) $BSDDIALOG_OK) ;; $BSDDIALOG_EXTRA) - exec 3>&1 + exec 5>&1 BSDINSTALL_DISTSITE=`bsddialog --backtitle "$OSNAME Installer" \ --title "Mirror Selection" \ --inputbox "Please enter the URL to an alternate $OSNAME mirror:" \ - 0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&3` + 0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&5` MIRROR_BUTTON=$? - exec 3>&- + exec 5>&- test $MIRROR_BUTTON -eq $BSDDIALOG_OK || exec $0 $@ ;; esac diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index bdbbd42b3328..99c129ab61f5 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -71,10 +71,10 @@ if [ -z "$INTERFACES" ]; then exit 1 fi -exec 3>&1 -INTERFACE=`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3` +exec 5>&1 +INTERFACE=`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&5` if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi -exec 3>&- +exec 5>&- : > $BSDINSTALL_TMPETC/._rc.conf.net @@ -182,13 +182,13 @@ else exit 0 fi -exec 3>&1 +exec 5>&1 RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle "$OSNAME Installer" \ --title 'Network Configuration' \ --mixedform 'Resolver Configuration' 0 0 0 \ -2>&1 1>&3) +2>&1 1>&5) if [ $? -eq $BSDDIALOG_CANCEL ]; then exec $0; fi -exec 3>&- +exec 5>&- echo ${RESOLV} | tr ' ' '\n' | \ awk ' diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index 7be4a59194c5..3da1803cd0d1 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -71,14 +71,14 @@ IP_ADDRESS=`ifconfig $INTERFACE inet | awk '/inet/ {printf("%s\n", $2); }'` NETMASK=`ifconfig $INTERFACE inet | awk '/inet/ {printf("%s\n", $4); }'` ROUTER=`netstat -rn -f inet | awk '/default/ {printf("%s\n", $2);}'` -exec 3>&1 +exec 5>&1 IF_CONFIG=$(bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \ 'IP Address' 1 1 "$IP_ADDRESS" 1 20 16 0 \ 'Subnet Mask' 2 1 "$NETMASK" 2 20 16 0 \ 'Default Router' 3 1 "$ROUTER" 3 20 16 0 \ -2>&1 1>&3) +2>&1 1>&5) if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi -exec 3>&- +exec 5>&- echo $INTERFACE $IF_CONFIG | awk -v prefix="$IFCONFIG_PREFIX" '{ diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index f2d864c539c4..00ef8791de4b 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -107,13 +107,13 @@ END { printf "\"Default Router\" %d 1 \"%s\" %d 16 50 50 0 ", n, dfr, n; }'` -exec 3>&1 +exec 5>&1 IF_CONFIG=$(echo ${ADDRS} | xargs -o bsddialog --backtitle "$OSNAME Installer" \ --title 'Network Configuration' \ --mixedform 'Static IPv6 Network Interface Configuration' 0 0 0 \ -2>&1 1>&3) +2>&1 1>&5) if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi -exec 3>&- +exec 5>&- echo ${IF_CONFIG} | tr ' ' '\n' | \ awk -v iface="${INTERFACE}" ' diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index 1c617835c274..ae1c6b3011fa 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -114,13 +114,12 @@ fi bsdinstall mount # Fetch missing distribution files, if any -( - exec 3>&1 - export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&3) - FETCH_RESULT=$? - exec 3>&- - return $FETCH_RESULT -) || error "Could not fetch remote distributions" +exec 5>&1 +export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&5) +FETCH_RESULT=$? +exec 5>&- + +[ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions" # Unpack distributions bsdinstall checksum diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index 025aaa444cd1..93282effbb3f 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -40,7 +40,7 @@ fi echo -n > $BSDINSTALL_TMPETC/rc.conf.services -exec 3>&1 +exec 5>&1 DAEMONS=$( bsddialog --backtitle "$OSNAME Installer" \ --title "System Configuration" --no-cancel --separate-output \ --checklist "Choose the services you would like to be started at boot:" \ @@ -55,9 +55,9 @@ DAEMONS=$( bsddialog --backtitle "$OSNAME Installer" \ powerd "Adjust CPU frequency dynamically if supported" \ ${powerd_enable:-off} \ dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \ -2>&1 1>&3 ) +2>&1 1>&5 ) retval=$? -exec 3>&- +exec 5>&- if [ $retval -ne $BSDDIALOG_OK ]; then exit 1 diff --git a/usr.sbin/bsdinstall/scripts/time b/usr.sbin/bsdinstall/scripts/time index bba58d291cbd..1d66fa4d5fcf 100755 --- a/usr.sbin/bsdinstall/scripts/time +++ b/usr.sbin/bsdinstall/scripts/time @@ -37,7 +37,7 @@ TZ="${BSDINSTALL_CHROOT}/etc/localtime" export TZ # Set date -exec 3>&1 +exec 5>&1 DATE=$(bsddialog --backtitle "$OSNAME Installer" \ --title 'Time & Date' \ --ok-label 'Set Date' \ @@ -45,11 +45,11 @@ DATE=$(bsddialog --backtitle "$OSNAME Installer" \ --default-no \ --date-format '%Y%m%d%H%M.%S' \ --datebox '' 0 40 \ -2>&1 1>&3) && date $DATE -exec 3>&- +2>&1 1>&5) && date $DATE +exec 5>&- # Set time -exec 3>&1 +exec 5>&1 TIME=$(bsddialog --backtitle "$OSNAME Installer" \ --title 'Time & Date' \ --ok-label 'Set Time' \ @@ -57,8 +57,8 @@ TIME=$(bsddialog --backtitle "$OSNAME Installer" \ --default-no \ --time-format '%H%M.%S' \ --timebox '' 0 40 \ -2>&1 1>&3) && date $TIME -exec 3>&- +2>&1 1>&5) && date $TIME +exec 5>&- # Switch back if [ -n "$saved_TZ" ]; then