Date: Wed, 1 Jun 2016 15:39:11 +0000 (UTC) From: Steven Hartland <smh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301131 - head/usr.sbin/tzsetup Message-ID: <201606011539.u51FdB8J011181@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: smh Date: Wed Jun 1 15:39:11 2016 New Revision: 301131 URL: https://svnweb.freebsd.org/changeset/base/301131 Log: Fix tzsetup not installing /etc/localtime for UTC If tzsetup UTC is run then it successfully configured the system for UTC including installing /etc/localtime however if the user ran just tzsetup for interactive configuration and select UTC no /etc/localtime was installed which resulted in failures for utilities which require said file. Change set_zone_utc to call install_zoneinfo("UTC") to ensure that /etc/localtime is created for interactive UTC selection. Users who have previously run tzsetup in interactive mode and select UTC can install the missing /etc/localtime by running tzsetup -r. Also correct static miss-match for set_zone_utc. MFC after: 2 weeks Relnotes: Yes Sponsored by: Multiplay Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Wed Jun 1 15:19:49 2016 (r301130) +++ head/usr.sbin/tzsetup/tzsetup.c Wed Jun 1 15:39:11 2016 (r301131) @@ -199,6 +199,7 @@ static char *chrootenv = NULL; static void usage(void); static int confirm_zone(const char *filename); static int continent_country_menu(dialogMenuItem *); +static int install_zoneinfo(const char *zoneinfo); static int install_zoneinfo_file(const char *zoneinfo_file); static int set_zone_multi(dialogMenuItem *); static int set_zone_whole_country(dialogMenuItem *); @@ -633,13 +634,13 @@ set_zone_menu(dialogMenuItem *dmi) return (DITEM_LEAVE_MENU); } -int +static int set_zone_utc(void) { if (!confirm_zone(NULL)) return (DITEM_FAILURE | DITEM_RECREATE); - return (install_zoneinfo_file(NULL)); + return (install_zoneinfo("UTC")); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606011539.u51FdB8J011181>