summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tzsetup
Commit message (Collapse)AuthorAgeFilesLines
* MFC r314463:ngie2017-05-301-1/+1
| | | | | | Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output.
* MFC r306375,r307802:ngie2017-05-302-58/+104
| | | | | | | | | | | | | | | | | | r306375 (by emaste): Add a WITHOUT_DIALOG src.conf(5) knob It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). r307802 (by bapt): Fix build of tzsetup when WITHOUT_DIALOG is set Hide dialog specific code behind HAVE_DIALOG. It allows to build a stripped down version (missing the dialog UI) but perfectly function tzsetup when world is built WITHOUT_DIALOG Reorganise a bit the code to limit the number of blocks under HAVE_DIALOG
* Fix tzsetup not installing /etc/localtime for UTCsmh2016-06-011-2/+3
| | | | | | | | | | | | | | | | | | | 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
* Avoid buffer overflow or truncation when constructing path_zoneinfo_file.truckman2016-05-261-1/+3
| | | | | | Reported by: Coverity CID: 1011160 MFC after: 1 week
* Use NULL instead of 0 for pointers.araujo2016-04-151-8/+8
| | | | | | | | | fgetln(3) will returns NULL if cannot get a line from a stream. strsep(3) it will returns NULL if the end of the string was reached. jemalloc(3) malloc will returns NULL if it cannot allocate memory. fgetln(3) it will returns NULL if it cannot get a line from a stream. MFC after: 4 weeks
* Revert r289269 for now. After looking at share/zoneinfo/Makefile this coulddelphij2015-10-271-11/+15
| | | | | potentially break non-root installs and we need a better solution, probably by doing it differently when no UI is involved.
* Use chroot(2) instead of using prefixes for files.delphij2015-10-131-15/+11
| | | | | | | | | | | | | Previously, the code prefixes the chroot path to actual file paths to simulate the effect. This, however, will not work for tzset(3) which expects the current system have a working set of timezone data files, and that is not always the case. This changeset simplifies the handling of paths and use an actual chroot(2) call to implement the effect. PR: bin/197313 MFC after: 2 weeks
* Add META_MODE support.sjg2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-272-4/+3
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-0/+9
| |\
| * \ Merge head from 7/28sjg2014-08-191-12/+2
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge from headsjg2014-05-081-1/+1
| |\ \ \
| * \ \ \ Merge headsjg2014-04-281-2/+12
| |\ \ \ \
| * \ \ \ \ sync from headsjg2013-04-121-0/+5
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | tzsetup: remove set but unused variableeadler2015-04-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - leave a comment explaining which variable it used to be Reported by: gcc5.1
* | | | | | | Convert usr.sbin to LIBADDbapt2014-11-251-2/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | Fix whitespace.dteske2014-11-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to: nwhitehorn
* | | | | | Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.dteske2014-11-111-0/+9
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Recommended by: cperciva Reviewed by: cperciva Relnotes: tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC
* | | | | Revert r261296. This removes the WITHOUT_NCURSESW option.brooks2014-05-151-12/+2
| |_|_|/ |/| | | | | | | | | | | | | | | It was the wrong direction. We will instead remove use of the non-wide-character supporting libncurses.
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| |_|/ |/| | | | | | | | from the latter.
* | | Merge from CheriBSD:brooks2014-01-301-2/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | commit c1acf022c533c5ae27e0cd556977eafe3f5959eb Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Fri Jan 17 21:46:44 2014 +0000 Add an option WITHOUT_NCURSESW to suppress building and linking to libncursesw. While wide character support it useful we'd like to only need one ncurses library on embedded systems. MFC after: 4 weeks Sponsored by: DARPA, AFRL
* | Fix VERBOSE reporting on results when removing _PATH_LOCALTIME for UTC option.dteske2013-03-041-0/+5
|/ | | | | PR: bin/164976 Submitted by: dteske
* Grammar: tzsetup now has more than one option.emaste2012-02-291-1/+1
|
* It's not an error if unlink(2) fails because the pathname doesn't exist.wollman2012-02-081-2/+2
| | | | | Noticed by: kevlo Pointy hat to: wollman
* Clean up reinstall option and remove duplicate codeemaste2012-01-251-23/+12
| | | | | | | | | | | | | | - Move the reinstall logic to be before menus are initialised (menus are not needed when reinstalling a zonefile). - Remove unnecessary re-initialization of path_db. - Update variable name and error message because we now use the zone name relative to /usr/share/zoneinfo, not the full path. pr: bin/164041 Submitted by: Devin Teske <dteske vicor com> MFC after: 1 week
* Fix #ifdef VERBOSE for UTC caseemaste2012-01-181-18/+25
| | | | | | | | | | | Update verbose output to match what actually happens when selecting the UTC option, and when the -n option is used. Patch updated slightly for new libdialog. PR: bin/164042 Submitted by: Devin Teske <dteske vicor com> MFC after: 2 weeks
* Don't write /var/db/zoneinfo when zone is not actually changed.emaste2012-01-181-3/+5
| | | | | | | | | If the specified zone file does not exist or the -n flag is specified, do not update /var/db/zoneinfo. PR: bin/164039 Submitted by: Devin Teske <dteske vicor com> MFC after: 1 week
* Use a reasonable-sized buffer when formatting error messages aboutwollman2012-01-121-3/+31
| | | | | | | | | | | | installing zoneinfo. While we're in the vicinity, add some missing error checking to eliminate an unhelpful error message when unlink() fails. /me is embarrassed by the quality of his 16-year-old code. The whole thing is awful and could stand a complete rewrite. PR: 164038 Submitted by: Devin Teske (but implemented differently)
* Sync xdialog_menu() implementation with sade.fjoe2011-12-011-1/+39
|
* calloc +1 DIALOG_LISTITEM to prevent possible wild pointer accessfjoe2011-11-241-3/+3
| | | | in dlg_default_listitem().
* Port to new libdialog.fjoe2011-11-242-46/+126
|
* If the user is moving from any other time zone to UTC we needdougb2011-11-021-0/+12
| | | | | to delete any old /var/db/zoneinfo file that may exist so that tzsetup -r does the right thing.
* - add missing options and arguments to program's usage()ru2011-05-202-23/+29
| | | | | | | | and sync it with manpage's SYNOPSIS - generally clean up a manpage's formatting Reviewed by: edwin
* Add a menu entry for UTC in the main menu.edwin2011-03-301-5/+39
| | | | | | | PR: bin/156019 Submitted by: Daniel O'Conner Reviewed by: Garrett Cooper <gcooper@FreeBSD.org> MFC after: 1 week
* Update dialog to version 20100428. This changes the license under whichnwhitehorn2011-01-121-3/+3
| | | | | | | | | | | | | dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new features and a new and better libdialog API. The existing libdialog will be kept temporarily as libodialog for compatibility purposes until sade, sysinstall and tzsetup have been either updated or replaced. __FreeBSD_version is now 900030. Discussed on: -current Approved by: core Obtained from: http://invisible-island.net/dialog
* Fix support for chrooted installs.nork2010-07-191-3/+3
| | | | Approved by: imp (mentor)
* Use literal format strings. Found by clang.emaste2010-06-141-2/+2
|
* Add comment that this value is unused.edwin2010-06-051-1/+1
| | | | | | | It is obvious that it isn't used, but both clang and Coverity talk about it. Found with: Coverity Prevent(tm) CID: 8066
* When there is a problem with writing, also bail out.edwin2010-06-051-1/+2
| | | | Found with the clang checker.
* The last big commit: let usr.sbin/ use WARNS=6 by default.ed2010-01-021-0/+2
|
* - Add support for chrooted installs.edwin2009-10-212-77/+156
| | | | | | - Add examples to the man-page. MFC after: 1 week
* Instead of having to know which timezone was picked last time, youedwin2009-10-202-16/+80
| | | | | | | now can run "tzsetup -r" which will reinstall the last choice. This data is recorded in /var/db/zoneinfo. MFC after: 1 week
* Make the usage of the default zoneinfo file to install clearer.edwin2009-10-191-5/+6
| | | | MFC after: 1 week
* When tzsetup is run as non-root and the "CMOS clock question onedwin2009-10-191-1/+3
| | | | | | | UTC" is answered as No, it would abort without properly ending the dialog session. MFC after: 1 week
OpenPOWER on IntegriCloud