aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index d257e128..f2b70a40 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -559,7 +559,7 @@ if [ "$READONLY" = "yes" ]; then
# Use the network address to set the hostname of the client. This
# must be done even if we have local storage.
ipaddr=
- if [ "$HOSTNAME" = "localhost" ]; then
+ if [ "$HOSTNAME" = "localhost" -o "$HOSTNAME" = "localhost.localdomain" ]; then
ipaddr=$(ip addr show to 0/0 scope global | awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }')
if [ -n "$ipaddr" ]; then
eval $(ipcalc -h $ipaddr 2>/dev/null)