From ed16ac3991ae3ac0c476e386a5459119d011699a Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Thu, 16 Apr 2020 03:18:30 +0800 Subject: [PATCH] luci-app-serverchan: sync with upstream source --- .../luci-app-serverchan/root/usr/bin/serverchan/serverchan | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan b/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan index 2564eecfe3..543293db44 100755 --- a/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan +++ b/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan @@ -147,9 +147,9 @@ function getname(){ if [ -z "$tmp_name" ] || ( echo "$tmp_name" | grep -q "unknown" ) ; then local dhcp_config=`uci show dhcp` local tmp_name=$(uci get dhcp.`echo "$dhcp_config" | grep -i ^dhcp.@host.*mac=.${2} | sed -nr 's#^dhcp.(.*).mac.*#\1#gp'`.name) 2>/dev/null - if [ -z "$tmp_name" ] ; then local tmp_name=$(uci get dhcp.`echo "$dhcp_config" | grep -i ^dhcp.@host.*ip=.${1} | sed -nr 's#^dhcp.(.*).ip.*#\1#gp'`.name) 2>/dev/null;fi + if [ -z "$tmp_name" ] ; then local tmp_name=$(uci get dhcp.`echo "$dhcp_config" | grep -w ^dhcp.@host.*ip=.${1} | sed -nr 's#^dhcp.(.*).ip.*#\1#gp'`.name) 2>/dev/null;fi if [ -z "$tmp_name" ] ; then local tmp_name=$(uci get dhcp.`echo "$dhcp_config" | grep -i ^dhcp.@domain.*mac=.${2} | sed -nr 's#^dhcp.(.*).mac.*#\1#gp'`.name) 2>/dev/null;fi - if [ -z "$tmp_name" ] ; then local tmp_name=$(uci get dhcp.`echo "$dhcp_config" | grep -i ^dhcp.@domain.*ip=.${1} | sed -nr 's#^dhcp.(.*).ip.*#\1#gp'`.name) 2>/dev/null;fi + if [ -z "$tmp_name" ] ; then local tmp_name=$(uci get dhcp.`echo "$dhcp_config" | grep -w ^dhcp.@domain.*ip=.${1} | sed -nr 's#^dhcp.(.*).ip.*#\1#gp'`.name) 2>/dev/null;fi fi if [ -z "$tmp_name" ] || ( echo "$tmp_name" | grep -q "unknown" ) ; then local tmp_name=`cat /var/dhcp.leases | grep -w $1 |awk '{print $4}' | grep -v "^$" | sort -u` 2>/dev/null;fi if [ -z "$tmp_name" ] ; then local tmp_name="unknown";fi @@ -1174,4 +1174,4 @@ do fi sleep $sleeptime continue -done \ No newline at end of file +done