[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
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
+
+