fix handle no /etc/host file like inside docker container

master
David Kebler 2023-03-19 11:52:38 -07:00
parent 4ff10e1ab2
commit 11ec123c0f
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ BASH_SHELL_ANY_NETWORK=$parent/any/network
export BASH_SHELL_DIRS
# machine specific shell
BASH_SHELL_HOST="$parent/$(cat /etc/host)"
BASH_SHELL_HOST="$parent/$([[ -f /etc/host ]] && cat /etc/host || echo nohostname)
# BASH_SHELL_HOST=<some directory>
# if there is a host directory add it to list and export env var
# [[ -d $BASH_SHELL_HOST ]] && BASH_SHELL_DIRS+="$BASH_SHELL_HOST " && export BASH_SHELL_HOST