[Feature][T106]ZXW P56U09 code
Only Configure: Yes
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: No
Doc Update: No
Change-Id: I3cbd8b420271eb20c2b40ebe5c78f83059cd42f3
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
+
+