netmask.subr (240684) | netmask.subr (240768) |
---|---|
1if [ ! "$_NETWORKING_NETMASK_SUBR" ]; then _NETWORKING_NETMASK_SUBR=1 2# 3# Copyright (c) 2006-2012 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 (INLUDING, 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 [ ! "$_NETWORKING_NETMASK_SUBR" ]; then _NETWORKING_NETMASK_SUBR=1 2# 3# Copyright (c) 2006-2012 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 (INLUDING, 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: head/usr.sbin/bsdconfig/networking/share/netmask.subr 240684 2012-09-18 22:28:42Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/networking/share/netmask.subr 240768 2012-09-20 23:44:13Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_include $BSDCFG_SHARE/dialog.subr 34f_include $BSDCFG_SHARE/strings.subr 35f_include $BSDCFG_SHARE/networking/common.subr --- 136 unchanged lines hidden (view full) --- 172 "$msg" \ 173 "$_netmask" \ 174 "$hline" )" 175 176 # 177 # Loop until the user provides taint-free input. 178 # 179 while :; do | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_include $BSDCFG_SHARE/dialog.subr 34f_include $BSDCFG_SHARE/strings.subr 35f_include $BSDCFG_SHARE/networking/common.subr --- 136 unchanged lines hidden (view full) --- 172 "$msg" \ 173 "$_netmask" \ 174 "$hline" )" 175 176 # 177 # Loop until the user provides taint-free input. 178 # 179 while :; do |
180 eval $DIALOG \ | 180 local dialog_inputbox 181 dialog_inputbox=$( eval $DIALOG \ |
181 --title \"\$DIALOG_TITLE\" \ 182 --backtitle \"\$DIALOG_BACKTITLE\" \ 183 --hline \"\$hline\" \ 184 --ok-label \"\$msg_ok\" \ 185 --cancel-label \"\$msg_cancel\" \ 186 --inputbox \"\$msg\" $size \ 187 \"\$_netmask\" \ | 182 --title \"\$DIALOG_TITLE\" \ 183 --backtitle \"\$DIALOG_BACKTITLE\" \ 184 --hline \"\$hline\" \ 185 --ok-label \"\$msg_ok\" \ 186 --cancel-label \"\$msg_cancel\" \ 187 --inputbox \"\$msg\" $size \ 188 \"\$_netmask\" \ |
188 2> "$DIALOG_TMPDIR/dialog.inputbox.$$" | 189 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 190 ) |
189 190 local retval=$? | 191 192 local retval=$? |
193 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox" |
|
191 _input=$( f_dialog_inputstr ) 192 193 # 194 # Return error status if: 195 # - User has not made any changes to the given value 196 # - User has either pressed ESC or chosen Cancel/No 197 # 198 [ "$_netmask" = "$_input" ] && return $FAILURE --- 17 unchanged lines hidden --- | 194 _input=$( f_dialog_inputstr ) 195 196 # 197 # Return error status if: 198 # - User has not made any changes to the given value 199 # - User has either pressed ESC or chosen Cancel/No 200 # 201 [ "$_netmask" = "$_input" ] && return $FAILURE --- 17 unchanged lines hidden --- |