From 2eac68ec5101b9759028bd54c64bea81a8125982 Mon Sep 17 00:00:00 2001 From: einsiedlerkrebs Date: Tue, 30 Apr 2024 15:52:53 +0200 Subject: [PATCH] fixing dynamic etc hosts switch --- share/pot/start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/pot/start.sh b/share/pot/start.sh index 3d6e26e..cd2299a 100644 --- a/share/pot/start.sh +++ b/share/pot/start.sh @@ -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"