[REF] Use host's time zone for jails by default
This commit is contained in:
@@ -25,7 +25,7 @@ bastille_sharedir="/usr/local/share/bastille" ## default
|
|||||||
bastille_bootstrap_archives="base" ## default: "base"
|
bastille_bootstrap_archives="base" ## default: "base"
|
||||||
|
|
||||||
## default timezone
|
## default timezone
|
||||||
bastille_tzdata="Etc/UTC" ## default: "Etc/UTC"
|
bastille_tzdata="" ## default: empty to use host's time zone
|
||||||
|
|
||||||
## default jail resolv.conf
|
## default jail resolv.conf
|
||||||
bastille_resolv_conf="/etc/resolv.conf" ## default: "/etc/resolv.conf"
|
bastille_resolv_conf="/etc/resolv.conf" ## default: "/etc/resolv.conf"
|
||||||
|
|||||||
@@ -440,8 +440,13 @@ create_jail() {
|
|||||||
ln -s usr/home home
|
ln -s usr/home home
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## TZ: configurable (default: Etc/UTC)
|
## TZ: configurable (default: empty to use host's time zone)
|
||||||
ln -s "/usr/share/zoneinfo/${bastille_tzdata}" etc/localtime
|
if [ -z "${bastille_tzdata}" ]; then
|
||||||
|
# uses cp as a way to prevent issues with symlinks if the host happens to use that for tz configuration
|
||||||
|
cp /etc/localtime etc/localtime
|
||||||
|
else
|
||||||
|
ln -s "/usr/share/zoneinfo/${bastille_tzdata}" etc/localtime
|
||||||
|
fi
|
||||||
|
|
||||||
# Post-creation jail misc configuration
|
# Post-creation jail misc configuration
|
||||||
# Create a dummy fstab file
|
# Create a dummy fstab file
|
||||||
|
|||||||
Reference in New Issue
Block a user