summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Add support for using mtree(5) manifest files to define the imagemarcel2011-06-197-18/+1111
| | | | | | | | | | | | | | | | | | | | to be created. The support is based on mtree version 2.0, as used in libarchive, but adds new features on top of it. The current implementation is fully functional, but is envisioned to grow at least the following additional features over time: o Add support for the /include special command so that manifest files can be constructed using includable fragments. o Add support specifying a search path to locate content files. o Content file filters: commands that provide file contents on stdout. The manifest file eliminates the need to first construct a tree as root in order to create an image and allows images (releases) to be created directly from object trees and/or source trees. Reviewed by: deo Sponsored by: Juniper Networks, Inc
* Add 'show logstate' to usage().bz2011-06-181-0/+1
| | | | MFC after: 1 week
* Add a missing ',' to separate arguments lost for r222465 only found inbz2011-06-181-1/+1
| | | | | | | case a complete world is built without INET support. MFC after: 10 days X-MFC with: 222465
* Add WITHOUT_UTMPX switch to the build system.ed2011-06-171-4/+7
| | | | | | | | | This knob removes the tools that are exclusively used to view and maintain the databases maintained by utmpx, namely last, users, who, wtmpcvt, ac, lastlogin and utxrm. The tool w is not in this list, because it has some other functionality which is unrelated to utmpx; it is hardlinked to the uptime tool.
* Don't omit ac(8) as part of WITHOUT_ACCT.ed2011-06-171-2/+2
| | | | | | | The WITHOUT_ACCT switch is supposed to omit tools related to process accounting, namely accton and sa. ac(8) is just a simple tool that prints statistics based on data in the utx.log database. It has nothing to do with the former.
* Open the floppy disk device with O_RDONLY rather than O_RDWR. Afterjoerg2011-06-171-1/+1
| | | | | | | all, this is the fd*read* command, and thus should be able to read even write-protected disks. MFC after: 1 week
* Drop the include of <ufs/ffs/ffs_extern.h> from usr.sbin/makefs/ffs/ffs_bswap.cmckusick2011-06-162-16/+1
| | | | | | | | | and usr.sbin/makefs/ffs/ffs_subr.c as they have no need of anything in that file. No other programs or libraries include <ufs/ffs/ffs_extern.h> (nor should they as it is totally in-kernel interfaces). For added protection I enclosed the entire contents of <ufs/ffs/ffs_extern.h> in ifdef _KERNEL. Feedback from: Bruce Evans and Tai-hwa Liang
* Don't attempt to create the base directory when -d is specified.delphij2011-06-151-1/+1
| | | | MFC after: 1 month
* Plumb device physical path reporting from CAM devices, through GEOM andgibbs2011-06-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEVFS, and make it accessible via the diskinfo utility. Extend GEOM's generic attribute query mechanism into generic disk consumers. sys/geom/geom_disk.c: sys/geom/geom_disk.h: sys/cam/scsi/scsi_da.c: sys/cam/ata/ata_da.c: - Allow disk providers to implement a new method which can override the default BIO_GETATTR response, d_getattr(struct bio *). This function returns -1 if not handled, otherwise it returns 0 or an errno to be passed to g_io_deliver(). sys/cam/scsi/scsi_da.c: sys/cam/ata/ata_da.c: - Don't copy the serial number to dp->d_ident anymore, as the CAM XPT is now responsible for returning this information via d_getattr()->(a)dagetattr()->xpt_getatr(). sys/geom/geom_dev.c: - Implement a new ioctl, DIOCGPHYSPATH, which returns the GEOM attribute "GEOM::physpath", if possible. If the attribute request returns a zero-length string, ENOENT is returned. usr.sbin/diskinfo/diskinfo.c: - If the DIOCGPHYSPATH ioctl is successful, report physical path data when diskinfo is executed with the '-v' option. Submitted by: will Reviewed by: gibbs Sponsored by: Spectra Logic Corporation Add generic attribute change notification support to GEOM. sys/sys/geom/geom.h: Add a new attrchanged method field to both g_class and g_geom. sys/sys/geom/geom.h: sys/geom/geom_event.c: - Provide the g_attr_changed() function that providers can use to advertise attribute changes. - Perform delivery of attribute change notifications from a thread context via the standard GEOM event mechanism. sys/geom/geom_subr.c: Inherit the attrchanged method from class to geom (class instance). sys/geom/geom_disk.c: Provide disk_attr_changed() to provide g_attr_changed() access to consumers of the disk API. sys/cam/scsi/scsi_pass.c: sys/cam/scsi/scsi_da.c: sys/geom/geom_dev.c: sys/geom/geom_disk.c: Use attribute changed events to track updates to physical path information. sys/cam/scsi/scsi_da.c: Add AC_ADVINFO_CHANGED to the registered asynchronous CAM events for this driver. When this event occurs, and the updated buffer type references our physical path attribute, emit a GEOM attribute changed event via the disk_attr_changed() API. sys/cam/scsi/scsi_pass.c: Add AC_ADVINFO_CHANGED to the registered asynchronous CAM events for this driver. When this event occurs, update the physical patch devfs alias for this pass instance. Submitted by: gibbs Sponsored by: Spectra Logic Corporation
* Use alternative, less messy solution to avoid breakage after r223020:dim2011-06-132-6/+0
| | | | | | put the snapdata structure between #ifdef _KERNEL guards. Suggested by: kib
* Apparently makefs needs a few more system headers to compile duringdim2011-06-132-0/+5
| | | | buildworld.
* Unbreak usr.sbin/makefs after r223020.dim2011-06-121-0/+1
| | | | Pointy hat to: mckusick
* I forgot what year it is, apparently.nwhitehorn2011-06-121-1/+1
| | | | Submitted by: brucec
* Long-overdue man page for bsdinstall.nwhitehorn2011-06-112-0/+188
|
* Support SIGHUP for reloading /etc/rtadvd.conf.hrs2011-06-115-51/+142
|
* Contrary to when returning in all-good cases at the end of functions webz2011-06-097-62/+216
| | | | | | | | | | did not free memory (1) or close the file descriptor (2) in error cases. Reported by: Mark Johnston (1) Reported by: attilio (2) Reviewed by: jhb Sponsored by: Sandvine Incorporated MFC after: 1 week
* - Accumulate RA options instead of replacing old ones when a new RA arrived.hrs2011-06-084-142/+285
| | | | | | | | | | | | | | | | RFC 4861 6.3.4 clearly defines handling multiple RAs in this way. - RDNSS/DNSSL options from multiple RAs on a single link will be gathered and sent to resolvconf(8). - Call "resolvconf -d" only after at least one RDNSS or DNSSL option is received and then all of them are expired. - The rtsold.dump output now supports displaying a list of the RA options. - Use more human-readable expression for logging values of struct timeval. Discussed with: ume
* - Disable "resolvconf -d" temporarily to avoid extra invocations of the scripthrs2011-06-082-2/+7
| | | | | | | under a certain condition. - Fix argv handling. Spotted by: ume
* Fix a bug that prevents tc=xxx from working.hrs2011-06-071-2/+1
|
* - Use ELM_MALLOC() for struct rainfo.hrs2011-06-071-11/+5
| | | | | | | - Fix a missing back pointer assignment in struct prefix to struct rainfo when addr="" is specified. This caused SIGSEGV. - Insert a prefix element to a tail queue after setting parameters.
* MFCattilio2011-06-071-0/+1
|\
| * Lower WARNS level to 3 to eliminate alignment warnings related tomarcel2011-06-071-0/+1
| | | | | | | | casting inherent in CMSG_DATA().
* | MFCattilio2011-06-0632-1738/+2906
|\ \ | |/
| * Remove redundant assignments to WARNS.ed2011-06-063-4/+0
| | | | | | | | For these directories, WARNS is already implied to be 6.
| * Set WARNS=1 temporarily to unbreak universe.hrs2011-06-061-1/+1
| |
| * Allow custom files to be opened and allow sorting by timestamp.ed2011-06-062-18/+60
| | | | | | | | | | | | | | | | While implementing a tool to import lastlog entries into utmpx, I noticed lastlogin doesn't allow custom database files to be opened. Add a -f switch to support this. Also, add -r and -t similar to ls(1), ruptime(1), etc. where you can sort entries by timestamp and reverse them. This allows you to spot active/idle users more easily.
| * Include param.h for CACHE_LINE_SIZE to unbreak the build.bz2011-06-061-1/+2
| |
| * Remove TODO which is not longer needed and the default.bz2011-06-061-1/+0
| |
| * Fix build on 64-bit arch.hrs2011-06-063-5/+5
| | | | | | | | | | Submitted by: dim Pointy hat to: hrs
| * - Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisementhrs2011-06-0627-1714/+2844
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Options for DNS Configuration) into rtadvd(8) and rtsold(8). DNS information received by rtsold(8) will go to resolv.conf(5) by resolvconf(8) script. This is based on work by J.R. Oldroyd (kern/156259) but revised extensively[1]. - rtadvd(8) now supports "noifprefix" to disable gathering on-link prefixes from interfaces when no "addr" is specified[2]. An entry in rtadvd.conf with "noifprefix" + no "addr" generates an RA message with no prefix information option. - rtadvd(8) now supports RTM_IFANNOUNCE message to fix crashes when an interface is added or removed. - Correct bogus ND_OPT_ROUTE_INFO value to one in RFC 4191. Reviewed by: bz[1] PR: kern/156259 [1] PR: bin/152458 [2]
* | MFCattilio2011-06-041-3/+7
|\ \ | |/
| * Fix resolv.conf search list creation:bz2011-06-041-3/+7
| | | | | | | | | | | | | | | | 1) do not print out an empty "search ", things do not like it. 2) the search list is not comma separated. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* | MFCattilio2011-06-036-96/+657
|\ \ | |/
| * Fix the nfs related daemons so that they don't intermittentlyrmacklem2011-06-021-28/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail with "bind: address already in use". This problem was reported to the freebsd-stable@ mailing list on Feb. 19 under the subject heading "statd/lockd startup failure" by george+freebsd at m5p dot com. The problem is that the first combination of {udp,tcp X ipv4,ipv6} would select a port# dynamically, but one of the other three combinations would have that port# already in use. The patch is somewhat involved because it was requested by dougb@ that the four combinations use the same port# wherever possible. The patch splits the create_service() function into two functions. The first goes as far as bind(2) in a loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port# for all four cases. If these attempts fail, the last attempt allows the 4 cases to use different port #s. After this function has succeeded, the second function, called complete_service(), does the rest of what create_service() did. The three daemons mountd, rpc.lockd and rpc.statd all have a create_service() function that is patched in a similar way. However, create_service() has non-trivial differences for the three daemons that made it impractical to share the same functions between them. Reviewed by: jhb MFC after: 2 weeks
| * Fix the nfs related daemons so that they don't intermittentlyrmacklem2011-06-021-28/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail with "bind: address already in use". This problem was reported to the freebsd-stable@ mailing list on Feb. 19 under the subject heading "statd/lockd startup failure" by george+freebsd at m5p dot com. The problem is that the first combination of {udp,tcp X ipv4,ipv6} would select a port# dynamically, but one of the other three combinations would have that port# already in use. The patch is somewhat involved because it was requested by dougb@ that the four combinations use the same port# wherever possible. The patch splits the create_service() function into two functions. The first goes as far as bind(2) in a loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port# for all four cases. If these attempts fail, the last attempt allows the 4 cases to use different port #s. After this function has succeeded, the second function, called complete_service(), does the rest of what create_service() did. The three daemons mountd, rpc.lockd and rpc.statd all have a create_service() function that is patched in a similar way. However, create_service() has non-trivial differences for the three daemons that made it impractical to share the same functions between them. Reviewed by: jhb MFC after: 2 weeks
| * Fix the nfs related daemons so that they don't intermittentlyrmacklem2011-06-021-30/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail with "bind: address already in use". This problem was reported to the freebsd-stable@ mailing list on Feb. 19 under the subject heading "statd/lockd startup failure" by george+freebsd at m5p dot com. The problem is that the first combination of {udp,tcp X ipv4,ipv6} would select a port# dynamically, but one of the other three combinations would have that port# already in use. The patch is somewhat involved because it was requested by dougb@ that the four combinations use the same port# wherever possible. The patch splits the create_service() function into two functions. The first goes as far as bind(2) in a loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port# for all four cases. If these attempts fail, the last attempt allows the 4 cases to use different port #s. After this function has succeeded, the second function, called complete_service(), does the rest of what create_service() did. The three daemons mountd, rpc.lockd and rpc.statd all have a create_service() function that is patched in a similar way. However, create_service() has non-trivial differences for the three daemons that made it impractical to share the same functions between them. Reviewed by: jhb MFC after: 2 weeks
| * Write the multi step netconfig to a temporary file and only move thatbz2011-06-023-9/+10
| | | | | | | | | | | | | | | | | | | | to the final name if netconfig was completely finished. This fixes reentrance problems even better than r222611. Suggested by: nwhitehorn Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
| * Empty the network configuration only after the user decided to pick anbz2011-06-021-2/+2
| | | | | | | | | | | | | | | | | | | | interface. Otherwise an accidental start of the netowrk configuration and immediate cancel after the install has finished removes the previously configured settings. Discussed with: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
* | MFCattilio2011-06-022-5/+5
|\ \ | |/
| * Fix opening a shell on the new system (prevent the shell's stderr fromnwhitehorn2011-06-021-1/+1
| | | | | | | | ending up in the install log).
| * There are a couple of structs in mfireg.h with members named 'class'.emaste2011-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | These cause problems when trying to include the header in a C++ project. Rename them to 'evt_class', and track the change in mfi and mfiutil. Submitted by: Mark Johnston Sponsored by: Sandvine Incorporated Reviewed by: jhb@ MFC after: 1 week
| * Don't try to close the stream if fopen(3) fails.jh2011-06-011-1/+1
| | | | | | | | | | PR: bin/155349 Submitted by: Urankar Mikael
| * Start teaching pc-sysinstall about IPv6.bz2011-05-313-28/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some additional empty string checks for IPv4 and try to configure a netmask along with the address rather than doing things twice. Contrary to AUTO-DHCP, IPv6-SLAAC will accept static configuration as well, which we will use at least for resolv.conf currently and if we were given a static address configure that as an alias as well. The pc-sysinstaller changes going along were committed to PC-BSD as r10773. Reviewed by: kmoore Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
* | MFCattilio2011-06-011-1/+1
| |
* | MFCattilio2011-05-313-28/+249
| |
* | Revert r222363, as bde@ pointed out the initial solution was far moreattilio2011-05-311-1/+1
| | | | | | | | correct.
* | MFCattilio2011-05-319-100/+466
|\ \ | |/
| * Minor wording adjustments to usbdump(8).bcr2011-05-311-4/+4
| | | | | | | | | | | | | | PR: docs/157317 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: hps@ MFC after: 5 days
| * Contrary to the rc.conf framework, when manualy enabling IPv6 we havebz2011-05-301-1/+1
| | | | | | | | | | | | | | to -ifdiabled ourselves. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
| * While doing it right for current configuration, fix the entry for rc.confbz2011-05-301-1/+1
| | | | | | | | | | | | | | adding the missing mandatory "inet6" keyword. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
OpenPOWER on IntegriCloud