mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-02 19:51:25 +00:00
If the user is moving from any other time zone to UTC we need
to delete any old /var/db/zoneinfo file that may exist so that tzsetup -r does the right thing.
This commit is contained in:
parent
755d1ea5b5
commit
983ac1b7fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227011
1 changed files with 12 additions and 0 deletions
|
@ -565,6 +565,18 @@ install_zoneinfo_file(const char *zoneinfo_file)
|
||||||
|
|
||||||
return (DITEM_FAILURE | DITEM_RECREATE);
|
return (DITEM_FAILURE | DITEM_RECREATE);
|
||||||
}
|
}
|
||||||
|
if (unlink(path_db) < 0 && errno != ENOENT) {
|
||||||
|
snprintf(title, sizeof(title), "Error");
|
||||||
|
snprintf(prompt, sizeof(prompt),
|
||||||
|
"Could not delete %s: %s", path_db,
|
||||||
|
strerror(errno));
|
||||||
|
if (usedialog)
|
||||||
|
dialog_mesgbox(title, prompt, 8, 72);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s\n", prompt);
|
||||||
|
|
||||||
|
return (DITEM_FAILURE | DITEM_RECREATE);
|
||||||
|
}
|
||||||
return (DITEM_LEAVE_MENU);
|
return (DITEM_LEAVE_MENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue