Commit graph

89 commits

Author SHA1 Message Date
Devin Teske d2dc532df5 Fix VERBOSE reporting on results when removing _PATH_LOCALTIME for UTC option.
PR:		bin/164976
Submitted by:	dteske
2013-03-04 11:34:31 +00:00
Ed Maste c8b4c0aa6c Grammar: tzsetup now has more than one option. 2012-02-29 14:44:42 +00:00
Garrett Wollman 41b549dc80 It's not an error if unlink(2) fails because the pathname doesn't exist.
Noticed by: kevlo
Pointy hat to: wollman
2012-02-08 05:03:04 +00:00
Ed Maste 3129859c92 Clean up reinstall option and remove duplicate code
- 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
2012-01-25 02:15:40 +00:00
Ed Maste da4b02cf70 Fix #ifdef VERBOSE for UTC case
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
2012-01-18 04:37:35 +00:00
Ed Maste e202760872 Don't write /var/db/zoneinfo when zone is not actually changed.
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
2012-01-18 04:12:32 +00:00
Garrett Wollman 8c261aeac3 Use a reasonable-sized buffer when formatting error messages about
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)
2012-01-12 05:50:32 +00:00
Max Khon fcc050e759 Sync xdialog_menu() implementation with sade. 2011-12-01 09:02:57 +00:00
Max Khon 8396c7de45 calloc +1 DIALOG_LISTITEM to prevent possible wild pointer access
in dlg_default_listitem().
2011-11-24 18:45:23 +00:00
Max Khon 3567b2c445 Port to new libdialog. 2011-11-24 13:24:06 +00:00
Doug Barton 983ac1b7fc 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.
2011-11-02 04:21:20 +00:00
Ruslan Ermilov 81046d3cb3 - add missing options and arguments to program's usage()
and sync it with manpage's SYNOPSIS

- generally clean up a manpage's formatting

Reviewed by:	edwin
2011-05-20 17:35:10 +00:00
Edwin Groothuis 75a59404d5 Add a menu entry for UTC in the main menu.
PR:		bin/156019
Submitted by:	Daniel O'Conner
Reviewed by:	Garrett Cooper <gcooper@FreeBSD.org>
MFC after:	1 week
2011-03-30 21:33:23 +00:00
Nathan Whitehorn 4c8945a06b Update dialog to version 20100428. This changes the license under which
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
2011-01-12 14:55:02 +00:00
Norikatsu Shigemura 33ac3bc5a2 Fix support for chrooted installs.
Approved by:	imp (mentor)
2010-07-19 16:38:45 +00:00
Ed Maste 781e51d3eb Use literal format strings. Found by clang. 2010-06-14 23:51:35 +00:00
Edwin Groothuis 7ba8f7307a Add comment that this value is unused.
It is obvious that it isn't used, but both clang and Coverity talk about it.

Found with:   Coverity Prevent(tm)
CID:          8066
2010-06-05 12:53:44 +00:00
Edwin Groothuis 3b8d8bd75e When there is a problem with writing, also bail out.
Found with the clang checker.
2010-06-05 12:49:39 +00:00
Ed Schouten 71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Edwin Groothuis b5f58d7778 - Add support for chrooted installs.
- Add examples to the man-page.

MFC after:	1 week
2009-10-21 20:55:04 +00:00
Edwin Groothuis ada5f18a1b Instead of having to know which timezone was picked last time, you
now can run "tzsetup -r" which will reinstall the last choice. This
data is recorded in /var/db/zoneinfo.

MFC after:	 1 week
2009-10-20 06:54:31 +00:00
Edwin Groothuis b89269048d Make the usage of the default zoneinfo file to install clearer.
MFC after:	 1 week
2009-10-19 21:37:31 +00:00
Edwin Groothuis 08c7e8c879 When tzsetup is run as non-root and the "CMOS clock question on
UTC" is answered as No, it would abort without properly ending the
dialog session.

MFC after:	 1 week
2009-10-19 21:24:19 +00:00
Attilio Rao 5d279e6530 Add a new options (-s) that, when specified, skips the question about
adjusting the clock to UTC.
That avoids to write on /etc/wall_cmos_clock which is useful in some
cases (example: host user in a jail).

Sponsored by:	Sandvine Incorporated
Initially submitted by:	Matt Koivisto <mkoivisto at sandvine dot com>
Approved by:	re (kib)
2009-07-04 11:11:21 +00:00
Jung-uk Kim 659a596a2c - Replace rcsid with __FBSDID.
- Remove paths.h and embed it in the source.
- Remove stale alpha support.
- Clean up compiler warnings and fix style(9) bugs.
2008-06-03 22:34:52 +00:00
Jung-uk Kim 62467b2549 Fix a crash when Arctic Ocean is selected.
MFC after:	1 week
2008-06-02 23:37:33 +00:00
Ruslan Ermilov 59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Murray Stokely 84b7e70dfc Update wording regarding geography to match the man page and web site.
Specifically, change the second level menu title from 'Country' to
'Country or Region', since e.g. Hong Kong is not a country.

Submitted by:	Xin LI <delphij@frontfree.net>
2004-08-10 05:34:23 +00:00
Ruslan Ermilov 07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Jimmy Olgeni 50c956f08d Cosmetic fix: a message was mixed with a dialog box border line.
Approved by:	re (rwatson)
2003-11-28 20:44:25 +00:00
David E. O'Brien 052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Philippe Charnier 490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Dag-Erling Smørgrav cb20e5a97a Explicitly cast NCONTINENTS to int to silence an overflow warning. 2002-05-15 09:39:31 +00:00
David E. O'Brien a956ec3bed Default to UTC on sparc64 also. 2002-03-06 06:18:21 +00:00
Ruslan Ermilov c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
David E. O'Brien 90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
David E. O'Brien 546f81a8d1 Remove -Wall. It breaks compiling with non-gcc compilers. 2001-04-05 20:52:33 +00:00
David E. O'Brien 2881e5831b Default the UTC question to "yes" on the Alpha. 2001-04-05 02:46:40 +00:00
David E. O'Brien 232470f6f6 This builds fine with -Wall. 2001-04-05 02:46:21 +00:00
Ruslan Ermilov 345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Ben Smithurst d0d78e1303 Convert to use the <sys/queue.h> macros rather than fiddling with the queue
structure internals.

Reviewed by:	markm
2000-12-29 18:04:54 +00:00
Jordan K. Hubbard 0e3099f516 Use dialog_noyes() for UTC selection; uses No as default answer now. 2000-12-16 05:29:38 +00:00
Ruslan Ermilov e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Ruslan Ermilov b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Garrett Wollman eb2fc78027 Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).
2000-10-10 01:50:26 +00:00
Andrey A. Chernov f4723e5279 Remove unneded -lmytinfo 2000-09-16 03:33:00 +00:00
Jake Burkholder e39756439c Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00