Fix fallback configurations
This commit is contained in:
parent
fac4de2b46
commit
47f21d06a0
12
sh/net.sh
12
sh/net.sh
@ -360,7 +360,7 @@ _load_config() {
|
|||||||
eval config_${config_index}=
|
eval config_${config_index}=
|
||||||
|
|
||||||
config_index=0
|
config_index=0
|
||||||
eval $(_get_array fallback_${IFVAR})
|
eval "$(_get_array fallback_${IFVAR})"
|
||||||
for cmd in "$@" ; do
|
for cmd in "$@" ; do
|
||||||
eval fallback_${config_index}="'${cmd}'"
|
eval fallback_${config_index}="'${cmd}'"
|
||||||
config_index=$((${config_index} + 1))
|
config_index=$((${config_index} + 1))
|
||||||
@ -459,11 +459,13 @@ start() {
|
|||||||
if eend $? ; then
|
if eend $? ; then
|
||||||
oneworked=true
|
oneworked=true
|
||||||
else
|
else
|
||||||
eval config=\$fallback_${IFVAR}
|
eval config=\$fallback_${config_index}
|
||||||
if [ -n "${config}" ] ; then
|
if [ -n "${config}" ] ; then
|
||||||
einfo "Trying fallback configuration"
|
eoutdent
|
||||||
eval config_${config_index}=\$fallback_${IFVAR}
|
ewarn "Trying fallback configuration ${config}"
|
||||||
eval fallback_${config_index}=
|
eindent
|
||||||
|
eval config_${config_index}=\$config
|
||||||
|
unset fallback_${config_index}
|
||||||
config_index=$((${config_index} - 1))
|
config_index=$((${config_index} - 1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user