tcpip.subr (258420) | tcpip.subr (260675) |
---|---|
1if [ ! "$_MEDIA_TCPIP_SUBR" ]; then _MEDIA_TCPIP_SUBR=1 2# 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1if [ ! "$_MEDIA_TCPIP_SUBR" ]; then _MEDIA_TCPIP_SUBR=1 2# 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr 258420 2013-11-21 03:38:47Z dteske $ | 27# $FreeBSD: stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr 260675 2014-01-15 07:36:34Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." media/tcpip.subr 34f_include $BSDCFG_SHARE/device.subr 35f_include $BSDCFG_SHARE/dialog.subr --- 69 unchanged lines hidden (view full) --- 105# dots) exceeds the maximum of 63 characters. 106# 1 One or more individual labels within the hostname contains one 107# or more invalid characters. 108# 2 One or more individual labels within the hostname starts or 109# ends with a hyphen (hyphens are allowed, but a label cannot 110# begin or end with a hyphen). 111# 3 One or more individual labels within the hostname are null. 112# | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." media/tcpip.subr 34f_include $BSDCFG_SHARE/device.subr 35f_include $BSDCFG_SHARE/dialog.subr --- 69 unchanged lines hidden (view full) --- 105# dots) exceeds the maximum of 63 characters. 106# 1 One or more individual labels within the hostname contains one 107# or more invalid characters. 108# 2 One or more individual labels within the hostname starts or 109# ends with a hyphen (hyphens are allowed, but a label cannot 110# begin or end with a hyphen). 111# 3 One or more individual labels within the hostname are null. 112# |
113# f_dialog_validate_hostname $hostname | 113# To call this function and display an appropriate error message to the user 114# based on the above error codes, use the following function defined in 115# dialog.subr: |
114# | 116# |
115# If the hostname is determined to be invalid, the appropriate error will be 116# displayed using the f_show_msg function. | 117# f_dialog_validate_hostname $hostname |
117# 118f_validate_hostname() 119{ 120 local fqhn="$1" 121 122 # Return error if the hostname exceeds 255 characters 123 [ ${#fqhn} -gt 255 ] && return 255 124 --- 1593 unchanged lines hidden --- | 118# 119f_validate_hostname() 120{ 121 local fqhn="$1" 122 123 # Return error if the hostname exceeds 255 characters 124 [ ${#fqhn} -gt 255 ] && return 255 125 --- 1593 unchanged lines hidden --- |