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
This commit is contained in:
parent
24862f2287
commit
dc30160e1a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301131
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user