Commit Graph

87 Commits

Author SHA1 Message Date
wollman
046e176269 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
emaste
1d1e035e4a 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
emaste
168320bee8 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
emaste
b955b33d3a 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
wollman
240031a563 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
fjoe
e0bf9db8f3 Sync xdialog_menu() implementation with sade. 2011-12-01 09:02:57 +00:00
fjoe
8594dfe0c0 calloc +1 DIALOG_LISTITEM to prevent possible wild pointer access
in dlg_default_listitem().
2011-11-24 18:45:23 +00:00
fjoe
7e5bec7de1 Port to new libdialog. 2011-11-24 13:24:06 +00:00
dougb
1c4c4e955e 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
ru
1011156226 - 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
ddcfce408b 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
nwhitehorn
3d4e888988 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
nork
0634eb567c Fix support for chrooted installs.
Approved by:	imp (mentor)
2010-07-19 16:38:45 +00:00
emaste
69de12acb2 Use literal format strings. Found by clang. 2010-06-14 23:51:35 +00:00
edwin
fbdcfea8cb 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
9f84f21465 When there is a problem with writing, also bail out.
Found with the clang checker.
2010-06-05 12:49:39 +00:00
ed
073cafdd42 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
edwin
33fed7584a - Add support for chrooted installs.
- Add examples to the man-page.

MFC after:	1 week
2009-10-21 20:55:04 +00:00
edwin
3a5cbdb0c1 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
2f3c859aa5 Make the usage of the default zoneinfo file to install clearer.
MFC after:	 1 week
2009-10-19 21:37:31 +00:00
edwin
d1e8b30b35 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
d483a0f67c 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
jkim
4915a1e29c - 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
jkim
4bd0bcf691 Fix a crash when Arctic Ocean is selected.
MFC after:	1 week
2008-06-02 23:37:33 +00:00
ru
c05985f13f Sort sections. 2005-01-18 20:02:45 +00:00
murray
6dda2a6e99 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
ru
6294018a20 Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
olgeni
c22fdb1a5b Cosmetic fix: a message was mixed with a dialog box border line.
Approved by:	re (rwatson)
2003-11-28 20:44:25 +00:00
obrien
a920d12f89 style.Makefile(5) 2003-04-04 17:49:21 +00:00
charnier
d2168fe021 The .Nm utility 2002-07-14 14:47:15 +00:00
des
86afaea3e6 Explicitly cast NCONTINENTS to int to silence an overflow warning. 2002-05-15 09:39:31 +00:00
obrien
0e966b63cc Default to UTC on sparc64 also. 2002-03-06 06:18:21 +00:00
ru
4345758876 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
obrien
9c97c8f02d 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
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
ru
0d5f9334cf mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
obrien
16c480d908 Remove -Wall. It breaks compiling with non-gcc compilers. 2001-04-05 20:52:33 +00:00
obrien
785e958fa3 Default the UTC question to "yes" on the Alpha. 2001-04-05 02:46:40 +00:00
obrien
5ab71ff51c This builds fine with -Wall. 2001-04-05 02:46:21 +00:00
ru
afd506414e - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
ru
f10dc9aca1 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
ben
aa10518020 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
jkh
6646c6c9a4 Use dialog_noyes() for UTC selection; uses No as default answer now. 2000-12-16 05:29:38 +00:00
ru
71e2293ad4 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
ru
7d99729431 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
wollman
c5c43ce91f Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).
2000-10-10 01:50:26 +00:00
ache
7a44ca40ed Remove unneded -lmytinfo 2000-09-16 03:33:00 +00:00
jake
961b97d434 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
jake
d93fbc9916 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
charnier
00b25227dc Convert err() to errx(), reason is already provided. Complete the
abort on allocation failure instead of deferencing NULL later.
2000-01-23 20:25:01 +00:00