mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 04:17:25 +00:00
2c710b005a
Refresh patches. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 lines
373 B
Bash
14 lines
373 B
Bash
#! /bin/sh
|
|
|
|
HOSTNAME=$(/bin/hostname)
|
|
|
|
if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ]; then
|
|
# If hostname is invalid, and myhostname not existed in main.cf
|
|
/usr/sbin/postconf -h "myhostname" 2>/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
# Set "localhost" to main.cf
|
|
/usr/sbin/postconf -e "myhostname=localhost"
|
|
fi
|
|
fi
|
|
|