Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/scripts/netconfig
Context not available. | |||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
BSDCFG_SHARE="/usr/share/bsdconfig" | |||||
. $BSDCFG_SHARE/common.subr || exit 1 | |||||
INTERFACES="" | INTERFACES="" | ||||
BSDDIALOG_ITEMS="" | BSDDIALOG_ITEMS="" | ||||
Context not available. | |||||
done | done | ||||
if [ -z "$INTERFACES" ]; then | if [ -z "$INTERFACES" ]; then | ||||
bsddialog --backtitle 'FreeBSD Installer' \ | bsddialog --backtitle "$OSNAME Installer" \ | ||||
--title 'Network Configuration Error' \ | --title 'Network Configuration Error' \ | ||||
--msgbox 'No network interfaces present to configure.' 0 0 | --msgbox 'No network interfaces present to configure.' 0 0 | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
exec 3>&1 | exec 3>&1 | ||||
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` | 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` | ||||
if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi | if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi | ||||
exec 3>&- | exec 3>&- | ||||
Context not available. | |||||
esac | esac | ||||
if [ ${IPV4_AVAIL} -eq 1 ]; then | if [ ${IPV4_AVAIL} -eq 1 ]; then | ||||
bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ | bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ | ||||
--yesno 'Would you like to configure IPv4 for this interface?' 0 0 | --yesno 'Would you like to configure IPv4 for this interface?' 0 0 | ||||
if [ $? -eq $BSDDIALOG_OK ]; then | if [ $? -eq $BSDDIALOG_OK ]; then | ||||
bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" || \ | bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" || \ | ||||
Context not available. | |||||
echo ifconfig_${INTERFACE}=\"${IFCONFIG_PREFIX}\" >> $BSDINSTALL_TMPETC/._rc.conf.net | echo ifconfig_${INTERFACE}=\"${IFCONFIG_PREFIX}\" >> $BSDINSTALL_TMPETC/._rc.conf.net | ||||
fi | fi | ||||
if [ ${IPV6_AVAIL} -eq 1 ]; then | if [ ${IPV6_AVAIL} -eq 1 ]; then | ||||
bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ | bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ | ||||
--yesno 'Would you like to configure IPv6 for this interface?' 0 0 | --yesno 'Would you like to configure IPv6 for this interface?' 0 0 | ||||
if [ $? -eq $BSDDIALOG_OK ]; then | if [ $? -eq $BSDDIALOG_OK ]; then | ||||
bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0 | bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0 | ||||
Context not available. | |||||
fi | fi | ||||
exec 3>&1 | exec 3>&1 | ||||
RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle 'FreeBSD Installer' \ | RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle "$OSNAME Installer" \ | ||||
--title 'Network Configuration' \ | --title 'Network Configuration' \ | ||||
--mixedform 'Resolver Configuration' 0 0 0 \ | --mixedform 'Resolver Configuration' 0 0 0 \ | ||||
2>&1 1>&3) | 2>&1 1>&3) | ||||
Context not available. |