The use of the environment variable HOSTNAME, triggers
the checkbashisms script, so change HOSTNAME to LOCALHOST

Signed-off-by: Ulf Samuelsson <u...@emagii.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/hostname.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
index 95287cc..f4ba2b8 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
@@ -7,7 +7,7 @@
 # Default-Stop:
 # Short-Description: Set hostname based on /etc/hostname
 ### END INIT INFO
-HOSTNAME=$(/bin/hostname)
+LOCALHOST=$(/bin/hostname)

 hostname -b -F /etc/hostname 2> /dev/null
 if [ $? -eq 0 ]; then
@@ -17,6 +17,6 @@ fi
 # Busybox hostname doesn't support -b so we need implement it on our own
 if [ -f /etc/hostname ];then
        hostname `cat /etc/hostname`
-elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then +elif [ -z "$LOCALHOST" -o "$LOCALHOST" = "(none)" -o ! -z "`echo $LOCALHOST | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then
        hostname localhost
 fi
--
1.9.1
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to