Skip to content

Commit

Permalink
fixing dynamic etc hosts switch
Browse files Browse the repository at this point in the history
  • Loading branch information
einsiedlerkrebs committed Apr 30, 2024
1 parent e2f755d commit 2eac68e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions share/pot/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ _js_resolv()
# $1 pot name
_js_etc_hosts()
{
local _pname _phosts _hostname _bridge_name _cfile _aliases
local _pname _phosts _hostname _bridge_name _cfile _dynamics
_pname="$1"
_phosts="${POT_FS_ROOT}/jails/$_pname/m/etc/hosts"
_hostname="$( _get_conf_var "$_pname" host.hostname )"
_aliases="$( _get_conf_var "$_pname" pot.aliases )"
[ -n "$_aliases" ] && aopt="--aliases-included" || aopt=""
_dynamics="$( _get_conf_var "$_pname" pot.attr.dynamic-etc-hosts )"
[ "$_dynamics" = "YES" ] && aopt="--aliases-included" || aopt=""
printf "::1 localhost %s\n" "$_hostname" > "$_phosts"
printf "127.0.0.1 localhost %s\n" "$_hostname" >> "$_phosts"
_cfile="${POT_FS_ROOT}/jails/$_pname/conf/pot.conf"
Expand Down

0 comments on commit 2eac68e

Please sign in to comment.