summaryrefslogtreecommitdiffstats
path: root/client/shared/etc/preinit
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2015-11-05 13:24:45 +0000
committerramon <ramongomez@us.es>2015-11-05 13:24:45 +0000
commitccc18febdc4461f4c7494fe3091708d1b0e4a6eb (patch)
tree3fde11157f2ee14ca39e3202b932b2d06509969f /client/shared/etc/preinit
parent9e0ee124d4d6d81e817b0a4822f754c7fd871101 (diff)
#725: Definir zona horaria por defecto y sincronizar con NTP si existe la opciĆ³n {{{ogntp=}}}{{{IP}}} en el arranque del cliente.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4717 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/etc/preinit')
-rwxr-xr-xclient/shared/etc/preinit/loadenviron.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/shared/etc/preinit/loadenviron.sh b/client/shared/etc/preinit/loadenviron.sh
index b165ecfd..dd94e6e1 100755
--- a/client/shared/etc/preinit/loadenviron.sh
+++ b/client/shared/etc/preinit/loadenviron.sh
@@ -89,6 +89,10 @@ if [ -d $OPENGNSYS ]; then
export OGLOGFILE="$OGLOG/$(ogGetIpAddress).log"
fi
+# SincronizaciĆ³n horaria con servidor NTP.
+export TZ=${TZ:-"Europe/Madrid"} # Zona horaria por defecto: UTC+1.
+[ -n "$ogntp" -a "$status" != "offline" ] && ntpdate $ogntp
+
# Compatibilidad para usar proxy en clientes ogLive.
[ -z "$http_proxy" -a -n "$ogproxy" ] && export http_proxy="$ogproxy"