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
@ -199,6 +199,7 @@ static char *chrootenv = NULL;
|
|||||||
static void usage(void);
|
static void usage(void);
|
||||||
static int confirm_zone(const char *filename);
|
static int confirm_zone(const char *filename);
|
||||||
static int continent_country_menu(dialogMenuItem *);
|
static int continent_country_menu(dialogMenuItem *);
|
||||||
|
static int install_zoneinfo(const char *zoneinfo);
|
||||||
static int install_zoneinfo_file(const char *zoneinfo_file);
|
static int install_zoneinfo_file(const char *zoneinfo_file);
|
||||||
static int set_zone_multi(dialogMenuItem *);
|
static int set_zone_multi(dialogMenuItem *);
|
||||||
static int set_zone_whole_country(dialogMenuItem *);
|
static int set_zone_whole_country(dialogMenuItem *);
|
||||||
@ -633,13 +634,13 @@ set_zone_menu(dialogMenuItem *dmi)
|
|||||||
return (DITEM_LEAVE_MENU);
|
return (DITEM_LEAVE_MENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
set_zone_utc(void)
|
set_zone_utc(void)
|
||||||
{
|
{
|
||||||
if (!confirm_zone(NULL))
|
if (!confirm_zone(NULL))
|
||||||
return (DITEM_FAILURE | DITEM_RECREATE);
|
return (DITEM_FAILURE | DITEM_RECREATE);
|
||||||
|
|
||||||
return (install_zoneinfo_file(NULL));
|
return (install_zoneinfo("UTC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user