freebsd-dev/usr.sbin
Doug Barton ad9bb0898d MFC r200416:
Simplify handling of MTREEFILE relative to DESTDIR

Make the message about a missing MTREEFILE combined with -U
more informative

MFC r200425:
Over time things that used to be files/directories/links can change
to something else. So add code to detect when things don't match and
give the user choices about how to fix it.

If we're using -P and something in the above check needs to be moved
we need to have the directory there for it, so create it at the
beginning and delete empty versions of it at the end.

The case where something used to be a file or link and now is supposed
to be a directory (e.g., /etc/security) is especially dangerous, so
make failure to install a necessary directory in $DESTDIR a fatal error.

MFC r200700:
In the places where find is used that the user may see the results,
first pipe it to sort so that order of processing will be deterministic
and like things will be grouped together.

MFC r200701:
Fix an indentation issue, no functional changes

MFC r200708:
Fix a problem with how mergemaster handles the hard links for /.cshrc
and /.profile. The problem is that install(1) will unlink the old file
before it installs the new one, which means that in the best case we
have to compare the changes for the old file twice.

So, change the logic to first test to see if the link exists, then
install the file. Then if the link was there and we're using -i, just
create the link in /root and be done with it. Otherwise display the
message to the user and give them the option.

Because we are now sorting things before doing the comparison we can
know conclusively that the files in / should be the sources, and the
files in /root will be the targets, so adjust the paths accordingly.

While I'm here, split a too-long error message into two lines and
just return at the end of handling these files instead of setting
the variable that says "do nothing" and then returning at the end
of the function anyway.

MFC r201291:
Add some patches contributed by jhb:
1. Don't prompt the user for "-U but no db" error if we're using -a
2. Add an option to delete stale rc.d files automatically if the user
has DELETE_STALE_RC_FILES in their rc file. Lack of command line option
for this is not an oversight.
3. Add []'s around the terminal $ for the $FreeBSD$ test for -F

For one bug raised by jhb I did a more thorough solution:
There were a lot of things that "snuck in" between the end of the test
for -r and the start of the comparison. One of them is the creation of
the mtree db, as pointed out by jhb. Fix this problem more thoroughly
by moving the end of the test down to where it should/used to be, right
before the comparison. As a result, indent the interloping code to match.

MFC r201292:
Document the DELETE_STALE_RC_FILES option introduced in r201291. This is
an "rc file only" option by design.

While I'm here, update the comments in the example rc file to indicate
which command line options they relate to, and correct the defaults
for a couple of options.

MFC r201293:
It's not necessary to include both Op and Fl for command line options
included in the text, so use only the latter.

Clarify that using -U doesn't make sense in combination with -a

MFC r201323:
If we are using -p it does not make any sense to even create the
MTREENEW file since it will never be used.

MFC r201765:
Update copyright date

Update delete_temproot() to include the error message if it fails,
and clean up the places where it's called.

If there are no files left in temproot when the comparison is done
delete it without prompting. This should make "automated" runs of
mergemaster without -a a little easier.

Document the new behavior in the man page.
2010-01-15 03:28:46 +00:00
..
ac
accton
acpi MFC 196555: 2009-10-29 14:40:21 +00:00
adduser The original adduser/rmuser scripts in Perl used to modify the PATH 2008-07-30 18:37:21 +00:00
amd Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation 2009-06-24 18:42:21 +00:00
ancontrol Remove duplicate headers <sys/socket.h> 2008-04-21 07:25:26 +00:00
apm
apmd getopt(3) returns -1, not EOF when out of args. 2007-02-05 07:35:23 +00:00
arp MFC 201202: 2010-01-12 18:47:40 +00:00
asf Make grammar a bit more consistent in this document. 2006-12-20 06:21:51 +00:00
audit Merge OpenBSM 1.1 alpha 2 from the OpenBSM vendor branch to head, both 2008-12-02 23:26:43 +00:00
auditd Merge OpenBSM alpha 4 from OpenBSM vendor branch to head, both 2008-12-31 11:12:24 +00:00
auditreduce auditreduce now requires OpenBSM's config/config.h, so add that to the 2006-09-25 11:56:20 +00:00
authpf Do not bypass WARNS machinery by hadcoding -Werror into CFLAGS. 2006-09-21 18:16:22 +00:00
bluetooth Teach btpand(8) to recognized Bluetooth device node names. 2009-05-18 16:00:18 +00:00
boot0cfg Write the MBR by using the bootcode verb of the gpart class. 2009-03-02 04:35:52 +00:00
boot98cfg Correct typo in usage message. 2007-12-19 03:31:44 +00:00
bootparamd Remove a useless cast. 2008-08-02 00:10:02 +00:00
bsnmpd MFC r200122 2009-12-12 20:26:11 +00:00
btxld Allow for a zero length 'loader'. 2008-04-05 10:26:20 +00:00
burncd Correct the type for the global var accessed in sig handlers. 2009-01-05 16:47:42 +00:00
cdcontrol MFC r197833: 2009-11-11 19:50:52 +00:00
chkgrp
chown In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
chroot In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
ckdist Constify return value of stripath and avoid unnecessary deconst 2008-11-19 00:09:01 +00:00
clear_locks Add missing library dependency. 2008-03-29 18:07:06 +00:00
config Move the comment to it's correct place. 2009-02-07 11:40:47 +00:00
cpucontrol - Add support to atomically set/clear individual bits of a MSR register 2009-06-30 12:35:47 +00:00
crashinfo MFC r198846: 2009-11-10 00:41:22 +00:00
cron MFC r199804: 2009-12-19 19:35:53 +00:00
crunch Run with -B and just .POSIX. 2009-01-31 07:03:36 +00:00
ctm
cxgbtool This adds a new "stdio" mode to cxgbtool - it's an interactive mode 2009-06-24 22:28:48 +00:00
daemon Unbreak rev 1.7's getopt usage. The -f switch does not take an argument. 2007-04-19 16:43:30 +00:00
dconschat Include <sys/wait.h> and <signal.h> for wait() and kill(). 2009-06-14 12:44:09 +00:00
devinfo Bump up the limit for when to print the resources for a given resource 2007-10-27 13:06:15 +00:00
digictl
diskinfo MFC 200968: 2010-01-05 13:56:58 +00:00
dnssec-dsfromkey Update BIND to version 9.6.1rc1. This version has better performance and 2009-05-31 05:42:58 +00:00
dnssec-keyfromlabel Update BIND to version 9.6.1rc1. This version has better performance and 2009-05-31 05:42:58 +00:00
dnssec-keygen Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
dnssec-signzone Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
dumpcis Move sys/pccard/*.h here. 2009-02-15 03:21:37 +00:00
editmap
edquota Drag this code kicking and screaming into the twenty-first century. 2008-07-02 15:51:59 +00:00
eeprom - Sprinkle const. 2009-03-19 20:24:30 +00:00
extattr Invoke err() with a format string rather than directly with a passed 2008-07-15 16:07:34 +00:00
extattrctl
faithd Cleanup of userland __P use 2007-11-07 10:53:41 +00:00
fdcontrol Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities. 2009-06-24 19:47:53 +00:00
fdformat Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities. 2009-06-24 19:47:53 +00:00
fdread Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities. 2009-06-24 19:47:53 +00:00
fdwrite Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities. 2009-06-24 19:47:53 +00:00
fifolog Fixed NAME section. 2009-04-04 15:48:09 +00:00
flowctl Get the other NG_PATHLEN while I'm here too :(. 2009-06-09 05:24:06 +00:00
freebsd-update Disable SSL renegotiation in order to protect against a serious 2009-12-03 09:18:40 +00:00
ftp-proxy Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
fwcontrol Remove reference to phy_delay from fwcontrol. Thanks for the catch! 2009-02-17 23:56:16 +00:00
getfmac
getpmac Style tweak. 2009-07-30 09:51:04 +00:00
gssd - Remove superfluous comment 2009-01-30 15:28:56 +00:00
gstat o Turn the batch mode on if stdout is not tty. 2009-03-12 13:17:46 +00:00
i2c Introduce the I2C diagnostic utility. It let's discover and inspect slave 2009-01-26 14:00:50 +00:00
ifmcstat Merge final round of MLD changes from p4: 2009-05-27 18:57:13 +00:00
inetd MFC r199804: 2009-12-19 19:35:53 +00:00
iostat MFC 196254 - iostat: add a bit of space between tty in/out columns 2009-08-15 18:03:34 +00:00
ip6addrctl Cleanup of userland __P use 2007-11-07 10:53:41 +00:00
ipfwpcap Several cleanups to ipfwpcap(8). 2009-05-31 20:59:20 +00:00
IPXrouted Make IPXrouted compile using Clang by using ANSI function declarations. 2009-03-04 18:36:48 +00:00
jail MFC various commits back to stable/8: 2009-11-01 10:30:30 +00:00
jexec Add libjail, a (somewhat) simpler interface to the jail_set and jail_get 2009-06-24 18:18:35 +00:00
jls MFC r200449: 2009-12-20 04:45:32 +00:00
kbdcontrol Some clarifications to make keyboard configuration under syscons. 2008-01-29 18:28:50 +00:00
kbdmap - fix path for locale.alias 2009-04-28 20:20:13 +00:00
kernbb
keyserv Rename all symbols in libmp(3) to mp_*, just like Solaris. 2009-02-26 21:43:15 +00:00
kgmon Correct a typo 2006-06-29 09:18:16 +00:00
kgzip
kldxref various cleanups including: 2009-01-06 14:23:38 +00:00
lastlogin
lmcconfig Include string.h for strncpy prototype 2009-02-19 19:45:49 +00:00
lpr MFC r197625: Fix using lp(1) without the new -t option after r194171. 2009-10-06 21:23:49 +00:00
lptcontrol
mailstats
mailwrapper Markup fixes. 2006-09-29 17:57:04 +00:00
makefs Fix LLVM compiler errors related to K&R declarations with ANSI prototypes. 2009-02-26 20:59:05 +00:00
makemap
manctl
memcontrol
mergemaster MFC r200416: 2010-01-15 03:28:46 +00:00
mfiutil MFC: Remove spurious README and an old version of the manpage. 2009-10-28 21:08:20 +00:00
mixer mixer(8) is WARNS=6 clean since 1.25. 2008-03-16 08:06:36 +00:00
mld6query - rename the RETURN VALUES section to EXIT STATUS 2009-01-07 00:59:34 +00:00
mlxcontrol Make mlxcontrol work with more than one system drive: 2008-09-12 17:40:17 +00:00
mount_nwfs Use sysctlbyname() instead of sysctl 2006-05-11 17:23:57 +00:00
mount_portalfs Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
mount_smbfs
mountd Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation 2009-06-24 18:42:21 +00:00
moused Improve the virtual scrolling mechanism to make middle clicking less 2008-05-15 15:05:02 +00:00
mptable
mptutil Merge mptutil 2009-08-17 07:30:08 +00:00
mtest Merge IPv6-capable mtest(8) from MLDv2 branch. 2009-04-29 09:50:04 +00:00
mtree Write timestamps with exactly 9 digits after the period. 2009-01-31 05:17:28 +00:00
named Add support for the build options that are currently in the port: 2009-06-01 21:58:59 +00:00
named-checkconf Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
named-checkzone Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
named.reload
ndiscvt Integrate the NDIS USB support code to CURRENT. 2008-12-27 08:03:32 +00:00
ndp MFC r196866: 2009-09-05 17:29:08 +00:00
newsyslog Fix 6-year old cut&paste error. The # could be escaped with '\', not 2008-06-26 07:02:47 +00:00
nfscbd - Include rpcv2.h before other NFS includes. That allows nfscbd to 2009-06-20 08:46:40 +00:00
nfsd Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation 2009-06-24 18:42:21 +00:00
nfsdumpstate Code cleanup for nfs4 utilities: 2009-05-29 22:19:45 +00:00
nfsrevoke Code cleanup for nfs4 utilities: 2009-05-29 22:19:45 +00:00
nfsuserd Code cleanup for nfs4 utilities: 2009-05-29 22:19:45 +00:00
ngctl Add volatile to sig_atomic_t where it was missing. 2009-06-14 21:39:52 +00:00
nghook
nologin Update nologin(5) to match the modern reality of login.conf(5) and PAM. 2007-05-10 11:22:24 +00:00
nscd Remove "extern" from function prototypes, and fix some (but not all) 2009-06-13 14:12:55 +00:00
ntp MFC r198029: 2009-11-02 16:27:34 +00:00
nvram Revise markup. 2006-09-30 19:07:03 +00:00
ofwdump De-sparc64-ify (now that it's also installed on PowerPC). 2008-01-31 14:58:55 +00:00
pciconf - Add a few more register defintions for the PCI express capability 2009-04-17 19:07:44 +00:00
periodic - The weekly periodic runs occur on Saturday mornings, not on Sunday mornings 2007-09-07 21:54:45 +00:00
pkg_install Prepare for 8.0 package set, adjust for 8-stable, acknowledge 9-current 2009-08-12 07:37:18 +00:00
pmcannotate Import an initial revision of the pmcannotate tool. 2008-11-26 21:44:57 +00:00
pmccontrol Ignore absent CPUs when listing the current state of PMC hardware. 2008-11-16 04:26:38 +00:00
pmcstat Catch up with the times: "mozilla" -> "firefox". 2009-06-02 04:45:56 +00:00
pnpinfo Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
portsnap Set SO_NOSIGPIPE on sockets used by phttpget. Without this, if 2009-04-03 21:13:18 +00:00
powerd MFC r200819: 2010-01-06 20:54:04 +00:00
ppp MFC r196530: Document that ppp handles pipe(2) descriptors specially in 2009-08-29 04:15:37 +00:00
pppctl
praliases
praudit
procctl
pstat - Merge r196244: 2009-08-15 15:12:46 +00:00
pw Use arc4random_uniform() to avoid "modulo bias" 2008-08-16 15:41:03 +00:00
pwd_mkdb Verify that the username length is smaller than MAXLOGNAME when 2009-05-20 08:32:25 +00:00
quot Make `quot -a' work when we've got slashes in the device name. 2008-09-14 11:50:19 +00:00
quotaon Drag this code kicking and screaming into the twenty-first century. 2008-07-02 15:51:59 +00:00
rarpd
repquota Drag this code kicking and screaming into the twenty-first century. 2008-07-02 15:51:59 +00:00
rip6query Cleanup of userland __P use 2007-11-07 10:53:41 +00:00
rmt
rndc Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
rndc-confgen Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
route6d This main goals of this project are: 2008-12-15 06:10:57 +00:00
rpc.lockd Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation 2009-06-24 18:42:21 +00:00
rpc.statd Re-implement the client side of rpc.lockd in the kernel. This implementation 2008-06-26 10:21:54 +00:00
rpc.umntall Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation 2009-06-24 18:42:21 +00:00
rpc.yppasswdd yppasswdd assumed that a struct x_master_passwd is type punable to a 2009-02-18 22:27:46 +00:00
rpc.ypupdated Kill blank line at EOF. 2007-02-15 02:45:14 +00:00
rpc.ypxfrd o There is no securenets(5) man page, refer to ypserv(8). 2006-11-02 07:36:33 +00:00
rpcbind No network addresses in the system isn't a good excuse 2008-02-14 20:12:23 +00:00
rrenumd - rename the RETURN VALUES section to EXIT STATUS 2009-01-07 00:58:25 +00:00
rtadvd Properly convert bit value to a bit field. Before we were storing 2009-02-19 16:30:11 +00:00
rtprio
rtsold - rename the RETURN VALUES section to EXIT STATUS [1] 2009-01-07 00:54:30 +00:00
rwhod
sa Ensure that the -s flag truncates the accounting data. 2008-02-21 07:12:56 +00:00
sade Oops, missed removing an 's' in previous rev. 2008-12-30 18:21:54 +00:00
sendmail This FFR is no longer needed in sendmail 8.14 2007-04-09 01:45:52 +00:00
service MFC r200743: 2009-12-30 19:36:40 +00:00
setfib Correct the information about when the respective functionality first 2009-04-23 08:37:56 +00:00
setfmac An average consumer of fts(3) that avoids keeping pointers to old 2008-01-29 17:50:29 +00:00
setpmac
sicontrol Remove sicontrol(8)'s "ttystat". 2008-06-09 08:43:27 +00:00
smbmsg Force the use of the tbl(1) preprocessor. 2006-10-25 10:44:59 +00:00
snapinfo Imagine a situation where: 2007-03-16 12:36:54 +00:00
spkrtest
spray
sysinstall MFC r196272 2009-08-16 10:25:58 +00:00
syslogd MFC r199804: 2009-12-19 19:35:53 +00:00
tcpdchk
tcpdmatch
tcpdrop o) Restructure tcpdrop(8) to provide a facility to try to drop all established 2009-06-01 06:49:09 +00:00
tcpdump Add new build targets for tcpdump 4.0.0. 2009-03-21 18:40:38 +00:00
timed Fix LLVM compiler errors related to K&R declarations with ANSI prototypes. 2009-02-26 20:59:05 +00:00
traceroute Add AS lookup functionality. On each hop we query a whois server to 2008-02-20 23:29:53 +00:00
traceroute6 MFC r196475: 2009-09-13 11:34:33 +00:00
trpt Fix LLVM compiler errors related to K&R declarations with ANSI prototypes. 2009-02-26 20:59:05 +00:00
tzsetup Add a new options (-s) that, when specified, skips the question about 2009-07-04 11:11:21 +00:00
uathload add uathload.8 2009-04-08 06:51:58 +00:00
ugidfw In ugidfw(8), print the rule number and rule contents (as parsed and then 2008-12-24 22:40:13 +00:00
usbconfig MFC r198833 2009-12-09 23:14:53 +00:00
usbdevs Add missing -o to usage output. 2008-12-29 14:59:22 +00:00
vidcontrol Tweak some wording and markup. 2006-12-22 23:23:59 +00:00
vipw
wake - Properly order headers, local variables and prototypes. [1] 2009-07-01 22:23:26 +00:00
watch Convert the snp(4) driver to use cdevpriv. 2008-08-15 13:07:07 +00:00
watchdogd Don't exit from watchdogd on receiving a signal if we cannot stop the watchdog. 2006-12-15 22:47:36 +00:00
wlandebug add mesh support 2009-07-17 21:11:08 +00:00
wlconfig
wpa MFC r196472: 2009-08-23 16:21:49 +00:00
yp_mkdb
ypbind Don't rely on private RPC data structures when there is a perfectly good 2008-09-15 14:01:40 +00:00
yppoll
yppush Remove unsafe use of asynchronous I/O (the SIGIO handler could cause 2006-08-16 12:58:41 +00:00
ypserv Support shadow.byname and shadow.byuid maps, protecting them by 2009-06-25 16:15:39 +00:00
ypset Increase helpfulness in diagnostic message - ypbind running without -ypset or 2007-02-28 22:49:12 +00:00
zic MFC of r200832, tzdata2009t 2009-12-29 10:05:20 +00:00
zzz
Makefile MFC r200743: 2009-12-30 19:36:40 +00:00
Makefile.inc