bsdinstall hardening: Replace dialog with bsddialog

bsdinstall/scripts/hardening: Replace (LGPL) dialog utility with
(BSD-2-CLAUSE) dialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34102
This commit is contained in:
Alfonso S. Siciliano 2022-03-23 00:52:22 +01:00
parent 44b36b80f5
commit 4d1ba6febf
No known key found for this signature in database
GPG key ID: 3F9EEFACFD371E37

View file

@ -26,14 +26,14 @@
#
# $FreeBSD$
: ${DIALOG_OK=0}
: ${BSDDIALOG_OK=0}
echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening
echo -n > $BSDINSTALL_TMPETC/sysctl.conf.hardening
echo -n > $BSDINSTALL_TMPBOOT/loader.conf.hardening
exec 3>&1
FEATURES=$( dialog --backtitle "FreeBSD Installer" \
FEATURES=$( bsddialog --backtitle "FreeBSD Installer" \
--title "System Hardening" --nocancel --separate-output \
--checklist "Choose system security hardening options:" \
0 0 0 \
@ -49,8 +49,13 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \
"9 secure_console" "Enable console password prompt" ${secure_console:-off} \
"10 disable_ddtrace" "Disallow DTrace destructive-mode" ${disable_ddtrace:-off} \
2>&1 1>&3 )
retval=$?
exec 3>&-
if [ $retval -ne $BSDDIALOG_OK ]; then
exit 1
fi
for feature in $FEATURES; do
case "$feature" in
hide_uids)
@ -88,4 +93,3 @@ for feature in $FEATURES; do
;;
esac
done