zte's code,first commit
Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/ap/app/Script/scripts/config-hostname.sh b/ap/app/Script/scripts/config-hostname.sh
new file mode 100644
index 0000000..bf4c5cc
--- /dev/null
+++ b/ap/app/Script/scripts/config-hostname.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+path_sh=`nv get path_sh`
+. $path_sh/global.sh
+echo "Info: config-hostname.sh $1 $2 start" >> $test_log
+fname=$path_conf"/hostname_mac_file"
+fbak=$path_conf"/hostname_mac_file_bak"
+
+if [ "x$1" = "x" ]; then
+ echo "insufficient arguments.."
+elif [ "x$2" = "x" ]; then
+ sed -e "/$1/d" $fname > $fbak
+ cat $fbak > $fname
+ rm -f $fbak
+else # $1 mac, $2 hostname
+ sed -e "/$1/d" $fname > $fbak
+ echo "$1 $2" >> $fbak
+ cat $fbak > $fname
+ rm -f $fbak
+fi
+
+