netmask.subr (ab2043b81eaba0d7d7769b4a58b2b6d17bc464a3) netmask.subr (89498fdf4174b08bb67d684d14886539aff698b4)
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:

--- 163 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
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:

--- 163 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 ---