diff options
author | Richard Tollerton <rich.tollerton@ni.com> | 2014-07-17 16:56:56 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-19 00:08:59 +0100 |
commit | 0327db6b074f339f5ac9c919facb5e7e733829df (patch) | |
tree | 7291fe996918a151f57ffa88ff8c8a50c6da7b69 /meta/recipes-core | |
parent | 82ef864f19b5712bed54b92ff369b4dc0693dc9a (diff) | |
download | poky-0327db6b074f339f5ac9c919facb5e7e733829df.tar.gz |
initscripts: make hostname.sh coreutils-compatible
inetutils and busybox hostname utils support `hostname -F`; coreutils
hostname doesn't. So just use `cat` instead.
(From OE-Core rev: acb8674e498468088d867ffae9a458caa08d95d5)
Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/hostname.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh index 78fb91c409..95287cc139 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh | |||
@@ -16,7 +16,7 @@ fi | |||
16 | 16 | ||
17 | # Busybox hostname doesn't support -b so we need implement it on our own | 17 | # Busybox hostname doesn't support -b so we need implement it on our own |
18 | if [ -f /etc/hostname ];then | 18 | if [ -f /etc/hostname ];then |
19 | hostname -F /etc/hostname | 19 | hostname `cat /etc/hostname` |
20 | elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then | 20 | elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then |
21 | hostname localhost | 21 | hostname localhost |
22 | fi | 22 | fi |