hostname.subr (ab2043b81eaba0d7d7769b4a58b2b6d17bc464a3) | hostname.subr (89498fdf4174b08bb67d684d14886539aff698b4) |
---|---|
1if [ ! "$_NETWORKING_HOSTNAME_SUBR" ]; then _NETWORKING_HOSTNAME_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: --- 132 unchanged lines hidden (view full) --- 141 while :; do 142 143 size=$( f_dialog_inputbox_size \ 144 "$DIALOG_TITLE" \ 145 "$DIALOG_BACKTITLE" \ 146 "$msg" \ 147 "$hostname" \ 148 "$hline" ) | 1if [ ! "$_NETWORKING_HOSTNAME_SUBR" ]; then _NETWORKING_HOSTNAME_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: --- 132 unchanged lines hidden (view full) --- 141 while :; do 142 143 size=$( f_dialog_inputbox_size \ 144 "$DIALOG_TITLE" \ 145 "$DIALOG_BACKTITLE" \ 146 "$msg" \ 147 "$hostname" \ 148 "$hline" ) |
149 eval $DIALOG \ | 149 local dialog_inputbox 150 dialog_inputbox=$( eval $DIALOG \ |
150 --title \"\$DIALOG_TITLE\" \ 151 --backtitle \"\$DIALOG_BACKTITLE\" \ 152 --hline \"\$hline\" \ 153 --ok-label \"\$msg_ok\" \ 154 --cancel-label \"\$msg_cancel\" \ 155 --inputbox \"\$msg\" $size \ 156 \"\$hostname\" \ | 151 --title \"\$DIALOG_TITLE\" \ 152 --backtitle \"\$DIALOG_BACKTITLE\" \ 153 --hline \"\$hline\" \ 154 --ok-label \"\$msg_ok\" \ 155 --cancel-label \"\$msg_cancel\" \ 156 --inputbox \"\$msg\" $size \ 157 \"\$hostname\" \ |
157 2> "$DIALOG_TMPDIR/dialog.inputbox.$$" | 158 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 159 ) |
158 159 local retval=$? | 160 161 local retval=$? |
162 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox" |
|
160 hostname=$( f_dialog_inputstr ) 161 162 [ $retval -eq $SUCCESS ] || return $retval 163 164 # Taint-check the user's input 165 f_dialog_validate_hostname "$hostname" && break 166 167 done --- 44 unchanged lines hidden --- | 163 hostname=$( f_dialog_inputstr ) 164 165 [ $retval -eq $SUCCESS ] || return $retval 166 167 # Taint-check the user's input 168 f_dialog_validate_hostname "$hostname" && break 169 170 done --- 44 unchanged lines hidden --- |