diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-09-04 16:09:49 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-09-04 16:09:49 +0000 |
commit | 52dcaeb65d0959543104fd470e167f18a8a97fc9 (patch) | |
tree | 42088c7ac65bb9af772e13a9522d7068060f55b6 /package/6in4/files/6in4.hotplug | |
parent | 6edf2c577b22c3030acdeda3f9987846374f0193 (diff) | |
download | upstream-52dcaeb65d0959543104fd470e167f18a8a97fc9.tar.gz upstream-52dcaeb65d0959543104fd470e167f18a8a97fc9.tar.bz2 upstream-52dcaeb65d0959543104fd470e167f18a8a97fc9.zip |
6in4: replace sed match with variable substitution, change pattern from a-z to a-f (hex only)
SVN-Revision: 22893
Diffstat (limited to 'package/6in4/files/6in4.hotplug')
-rw-r--r-- | package/6in4/files/6in4.hotplug | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/6in4/files/6in4.hotplug b/package/6in4/files/6in4.hotplug index b695b527ed..790edc0e15 100644 --- a/package/6in4/files/6in4.hotplug +++ b/package/6in4/files/6in4.hotplug @@ -32,7 +32,7 @@ if [ "$ACTION" = ifup ]; then config_get password "$cfg" password [ -n "$tunnelid" ] && [ -n "$username" ] && [ -n "$password" ] && { - [ "${#password}" != 32 ] || [ -n "$(echo "$password" | sed 's/[a-z0-9]//g')" ] && { + [ "${#password}" == 32 -a -z "${password//[a-f0-9]/}" ] && { password="$(echo -n "$password" | md5sum)"; password="${password%% *}" } uci_set_state network "$cfg" ipaddr "$wanip" |