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>
This commit is contained in:
parent
82ef864f19
commit
0327db6b07
|
@ -16,7 +16,7 @@ fi
|
|||
|
||||
# Busybox hostname doesn't support -b so we need implement it on our own
|
||||
if [ -f /etc/hostname ];then
|
||||
hostname -F /etc/hostname
|
||||
hostname `cat /etc/hostname`
|
||||
elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then
|
||||
hostname localhost
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue