6in4: fix logic fail in previous commit

SVN-Revision: 22897
This commit is contained in:
Jo-Philipp Wich 2010-09-04 16:12:40 +00:00
parent 52dcaeb65d
commit f1303bd074

View File

@ -32,7 +32,7 @@ if [ "$ACTION" = ifup ]; then
config_get password "$cfg" password
[ -n "$tunnelid" ] && [ -n "$username" ] && [ -n "$password" ] && {
[ "${#password}" == 32 -a -z "${password//[a-f0-9]/}" ] && {
[ "${#password}" == 32 -a -z "${password//[a-f0-9]/}" ] || {
password="$(echo -n "$password" | md5sum)"; password="${password%% *}"
}
uci_set_state network "$cfg" ipaddr "$wanip"