Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97711813
D34682.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D34682.diff
View Options
diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig
--- a/usr.sbin/bsdinstall/scripts/netconfig
+++ b/usr.sbin/bsdinstall/scripts/netconfig
@@ -32,14 +32,14 @@
# $FreeBSD$
INTERFACES=""
-DIALOG_TAGS=""
+BSDDIALOG_ITEMS=""
-: ${DIALOG_OK=0}
-: ${DIALOG_CANCEL=1}
-: ${DIALOG_HELP=2}
-: ${DIALOG_EXTRA=3}
-: ${DIALOG_ITEM_HELP=4}
-: ${DIALOG_ESC=255}
+: ${BSDDIALOG_OK=0}
+: ${BSDDIALOG_CANCEL=1}
+: ${BSDDIALOG_HELP=2}
+: ${BSDDIALOG_EXTRA=3}
+: ${BSDDIALOG_ESC=5}
+: ${BSDDIALOG_ERROR=255}
for IF in `ifconfig -l`; do
test "$IF" = "lo0" && continue
@@ -59,19 +59,19 @@
for IF in $INTERFACES; do
DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc`
- DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\""
+ BSDDIALOG_ITEMS="$BSDDIALOG_ITEMS $IF \"$DESC\""
done
if [ -z "$INTERFACES" ]; then
- dialog --backtitle 'FreeBSD Installer' \
+ bsddialog --backtitle 'FreeBSD Installer' \
--title 'Network Configuration Error' \
--msgbox 'No network interfaces present to configure.' 0 0
exit 1
fi
exec 3>&1
-INTERFACE=`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3`
-if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
+INTERFACE=`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3`
+if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi
exec 3>&-
: > $BSDINSTALL_TMPETC/._rc.conf.net
@@ -101,9 +101,9 @@
esac
if [ ${IPV4_AVAIL} -eq 1 ]; then
- dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
+ bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
--yesno 'Would you like to configure IPv4 for this interface?' 0 0
- if [ $? -eq $DIALOG_OK ]; then
+ if [ $? -eq $BSDDIALOG_OK ]; then
bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" || \
exec $0
else
@@ -116,9 +116,9 @@
echo ifconfig_${INTERFACE}=\"${IFCONFIG_PREFIX}\" >> $BSDINSTALL_TMPETC/._rc.conf.net
fi
if [ ${IPV6_AVAIL} -eq 1 ]; then
- dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
+ bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
--yesno 'Would you like to configure IPv6 for this interface?' 0 0
- if [ $? -eq $DIALOG_OK ]; then
+ if [ $? -eq $BSDDIALOG_OK ]; then
bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0
else
IPV6_AVAIL=0
@@ -158,34 +158,34 @@
RESOLV=""
if [ ${IPV6_AVAIL} -eq 1 -a ${IPV4_AVAIL} -eq 1 ]; then
RESOLV="
- 'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0
- 'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2
- 'IPv6 DNS #1' 2 0 \"${IP6_1}\" 2 16 50 0 0
- 'IPv6 DNS #2' 3 0 \"${IP6_2}\" 3 16 50 0 0
- 'IPv4 DNS #1' 4 0 \"${IP4_1}\" 4 16 16 0 0
- 'IPv4 DNS #2' 5 0 \"${IP4_2}\" 5 16 16 0 0"
+ 'Search' 1 1 \"${SEARCH}\" 1 16 50 50 0
+ 'Nameserver' 2 1 \"Nameserver\" 2 1 11 11 2
+ 'IPv6 DNS #1' 2 1 \"${IP6_1}\" 2 16 50 50 0
+ 'IPv6 DNS #2' 3 1 \"${IP6_2}\" 3 16 50 50 0
+ 'IPv4 DNS #1' 4 1 \"${IP4_1}\" 4 16 16 16 0
+ 'IPv4 DNS #2' 5 1 \"${IP4_2}\" 5 16 16 16 0"
elif [ ${IPV6_AVAIL} -eq 1 ]; then
RESOLV="
- 'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0
- 'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2
- 'IPv6 DNS #1' 2 0 \"${IP6_1}\" 2 16 50 0 0
- 'IPv6 DNS #2' 3 0 \"${IP6_2}\" 3 16 50 0 0"
+ 'Search' 1 1 \"${SEARCH}\" 1 16 50 50 0
+ 'Nameserver' 2 1 \"Nameserver\" 2 1 11 11 2
+ 'IPv6 DNS #1' 2 1 \"${IP6_1}\" 2 16 50 50 0
+ 'IPv6 DNS #2' 3 1 \"${IP6_2}\" 3 16 50 50 0"
elif [ ${IPV4_AVAIL} -eq 1 ]; then
RESOLV="
- 'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0
- 'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2
- 'IPv4 DNS #1' 2 0 \"${IP4_1}\" 2 16 16 0 0
- 'IPv4 DNS #2' 3 0 \"${IP4_2}\" 3 16 16 0 0"
+ 'Search' 1 1 \"${SEARCH}\" 1 16 50 50 0
+ 'Nameserver' 2 1 \"Nameserver\" 2 1 11 11 2
+ 'IPv4 DNS #1' 2 1 \"${IP4_1}\" 2 16 16 16 0
+ 'IPv4 DNS #2' 3 1 \"${IP4_2}\" 3 16 16 16 0"
else
exit 0
fi
exec 3>&1
-RESOLV=$(echo "${RESOLV}" | xargs dialog --backtitle 'FreeBSD Installer' \
+RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle 'FreeBSD Installer' \
--title 'Network Configuration' \
--mixedform 'Resolver Configuration' 0 0 0 \
2>&1 1>&3)
-if [ $? -eq $DIALOG_CANCEL ]; then exec $0; fi
+if [ $? -eq $BSDDIALOG_CANCEL ]; then exec $0; fi
exec 3>&-
echo ${RESOLV} | tr ' ' '\n' | \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 1, 10:18 PM (12 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13224943
Default Alt Text
D34682.diff (4 KB)
Attached To
Mode
D34682: bsdinstall netconfig: Replace dialog with bsddialog
Attached
Detach File
Event Timeline
Log In to Comment