From: Jo-Philipp Wich Date: Sat, 4 Sep 2010 16:09:49 +0000 (+0000) Subject: 6in4: replace sed match with variable substitution, change pattern from a-z to a... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=52dcaeb65d0959543104fd470e167f18a8a97fc9;p=openwrt%2Fstaging%2Fzorun.git 6in4: replace sed match with variable substitution, change pattern from a-z to a-f (hex only) SVN-Revision: 22893 --- diff --git a/package/6in4/Makefile b/package/6in4/Makefile index c56b9c57ce..b9fa220df7 100644 --- a/package/6in4/Makefile +++ b/package/6in4/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6in4 PKG_VERSION:=5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 include $(INCLUDE_DIR)/package.mk 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"