summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/timezone
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2014-11-11 19:37:17 +0000
committerdteske <dteske@FreeBSD.org>2014-11-11 19:37:17 +0000
commit403bbe3478e61b3278821c642872c7c3e938cc8d (patch)
treef02a9f063cbcc9c4b07aa4549f30e9127fdd9631 /usr.sbin/bsdconfig/timezone
parenta75d2fd4af17b5b42c49afe06e1b28d268ac3e47 (diff)
downloadFreeBSD-src-403bbe3478e61b3278821c642872c7c3e938cc8d.zip
FreeBSD-src-403bbe3478e61b3278821c642872c7c3e938cc8d.tar.gz
Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.
Recommended by: cperciva Reviewed by: cperciva Relnotes: tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC
Diffstat (limited to 'usr.sbin/bsdconfig/timezone')
-rwxr-xr-xusr.sbin/bsdconfig/timezone/timezone5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bsdconfig/timezone/timezone b/usr.sbin/bsdconfig/timezone/timezone
index 0452230..66f2d78 100755
--- a/usr.sbin/bsdconfig/timezone/timezone
+++ b/usr.sbin/bsdconfig/timezone/timezone
@@ -62,7 +62,7 @@ _PATH_WALL_CMOS_CLOCK="/etc/wall_cmos_clock"
REALLYDOIT=1
REINSTALL=
USEDIALOG=1
-SKIPUTC=
+SKIPUTC= # See MAIN
VERBOSE=
TZ_OR_FAIL=
CHROOTENV=
@@ -119,6 +119,9 @@ dialog_menu_main()
############################################################ MAIN
+# Skip initial question regarding UTC v. Wall-Clock time if run in VM
+[ "$( sysctl -n kern.vm_guest 2> /dev/null )" = "none" ] || SKIPUTC=1
+
# Incorporate rc-file if it exists
[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
OpenPOWER on IntegriCloud