bsdinstall services: Replace dialog with bsddialog

Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34640
This commit is contained in:
Alfonso S. Siciliano 2022-03-26 00:19:36 +01:00
parent 2e88306786
commit 852d975ccf
No known key found for this signature in database
GPG Key ID: 3F9EEFACFD371E37

View File

@ -26,7 +26,7 @@
#
# $FreeBSD$
: ${DIALOG_OK=0}
: ${BSDDIALOG_OK=0}
if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then
eval $( sed -e s/YES/on/i -e s/NO/off/i \
@ -39,8 +39,8 @@ fi
echo -n > $BSDINSTALL_TMPETC/rc.conf.services
exec 3>&1
DAEMONS=$( dialog --backtitle "FreeBSD Installer" \
--title "System Configuration" --nocancel --separate-output \
DAEMONS=$( bsddialog --backtitle "FreeBSD Installer" \
--title "System Configuration" --no-cancel --separate-output \
--checklist "Choose the services you would like to be started at boot:" \
0 0 0 \
local_unbound "Local caching validating resolver" ${local_unbound:-off} \
@ -53,8 +53,13 @@ DAEMONS=$( dialog --backtitle "FreeBSD Installer" \
${powerd_enable:-off} \
dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \
2>&1 1>&3 )
retval=$?
exec 3>&-
if [ $retval -ne $BSDDIALOG_OK ]; then
exit 1
fi
havedump=
for daemon in $DAEMONS; do
[ "$daemon" = "dumpdev" ] && havedump=1 continue