http.test httpold.test socket.test failed when run the pTest-tcl,because the tcl script "info hostname" in /usr/lib/tcl/ptest/tests/http.test on target fail. When run the "info hostname" get the hostname,but it can find the IP in the /etc/hosts, so it failed. We need to add the IP and hostname pair in the /etc/hosts. In order to add the IP and hostname pair in the /etc/hosts, we need to add the pair when the target start, so I add the "echo "127.0.0.1 `cat /etc/hostname`" >> /etc/hosts" to the hostname.sh in "meta/recipes-core/initscripts/initscripts-1.0/", when the system invoke the hostname.sh in "/etc/init.d/", it add the IP and hostname pair in the /etc/hosts.
Signed-off-by: Dengke Du <[email protected]> --- meta/recipes-core/initscripts/initscripts-1.0/hostname.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh index 95287cc..8866d87 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh @@ -13,7 +13,7 @@ hostname -b -F /etc/hostname 2> /dev/null if [ $? -eq 0 ]; then exit fi - +echo "127.0.0.1 `cat /etc/hostname`" >> /etc/hosts # Busybox hostname doesn't support -b so we need implement it on our own if [ -f /etc/hostname ];then hostname `cat /etc/hostname` -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
