summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r259054:dteske2014-01-1577-746/+839
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance and debugging enhancements: + Remove UNAME_P=$(...) from startup/misc -- already supplied by common.subr + Use f_getvar instead of $(eval echo \$$var) -- f_getvar is sub-shell free + Add `-e' and `-k var' options to f_eval_catch -- increasing use-cases + Use f_eval_catch to display errors on failure -- reducing duplicated code + Use f_eval_catch when we need output from a command -- improving debugging + Optimize f_isinter of strings.subr for performance -- now sub-shell free + Improve error checking on pidfiles -- using f_eval_catch and f_isinteger + Use $var_to_set arg of f_ifconfig_{inet,netmask} -- eliminate sub-shells + Use f_sprintf instead of $(printf ...) -- consolidate sub-shells + Use $var_to_set arg of f_route_get_default -- eliminate sub-shells + Add f_count to replace $(set -- ...;echo $#) -- eliminate sub-shells + Add f_count_ifs to replace $(IFS=x;set -- ...;echo $#) -- no sub-shells + Replace var="$var${var:+ }..." in loops with var="$var ..." with a follow- up var="${var# }" to trim leading whitespace -- optimize loops + Use $var_to_set arg of f_resolv_conf_nameservers -- eliminate sub-shells + Comments for the f_eval_catch function + Remove a duplicate `local ... desc ...' in f_device_get_all of device.subr + Use $var_to_set arg of f_device_capacity -- eliminate sub-shells + Whitespace fixes in f_dialog_init of dialog.subr + Optimize f_inet_atoi of media/tcpip.subr for performance -- sub-shell free + In several cases, send stderr to /dev/null -- clean up runtime execution + Change f_err of common.subr to go to program stderr not terminal stderr, allowing redirection of output from functions that use f_err + Disable debugging when using f_getvar to get variable argument to f_startup_rcconf_map_expand of startup/rcconf.subr + Use f_replace_all instead of $(echo ... | tr | sed) -- performance + Add a $var_to_set option to f_index_{file,menusel_{command,keyword}} of common.subr -- centralize sub-shells
* MFC r258458:dteske2014-01-153-35/+173
| | | | | | | | | | | Improve network device scanning in the netdev module. First, make it use the `device.subr' framework (improving performane and reducing sub-shells). Next improve the `device.subr' framework itself. Make use of the `flags' device struct member for network interfaces to indicate if an interface is Active, Wired Ethernet, or 802.11 Wireless. Functions have been added to make checks against the `flags' bit-field quick and efficient. Last, add function for rescanning the network to update the device registers. Remove an unnecessary local (ifn) while we're here (use already provided local `if').
* MFC r258355,258360,258400-258401,258406-258407,258418,258430,258439,258589-dteske2014-01-1518-71/+452
| | | | | | | | | | | | | | | | | 258590,258592,258727-258728,258785, with the following descriptions: Revisions 258400-258401,258406-258407,258590,258727-258728,258785: + Add a new `includes' module (see: bsdconfig includes -h) for exploring the bsdconfig(8) API Remaining revisions: 258592: Sort all the messages.subr files 258355: Fix typo in a comment in networking/device.subr 258360: Whitespace, style, and other changes in networking/device.subr 258418: Quote interface names for good measure in networking/device.subr 258430: Remove an unused line in networking/device.subr 258439: Minor bugfix to f_die() function in common.subr 258589: Minor bugfix to syscons_ttys module
* MFC r260446remko2014-01-111-1/+1
| | | | | | | | virtio-block does not exist, the correct name is virtio-blk. PR: 185573 Submitted by: Allan Jude Facilitated by: Snow B.V.
* MFC r260334:dim2014-01-091-1/+1
| | | | | | | | | | | | Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree. MFC r260369: Apply band-aid for 32-bit compat libs failures after r260334: put back -Qunused-arguments for clang for now, until I can figure out a way to make it unneeded in all scenarios. Sorry about the breakage.
* MFC r260049:trociny2014-01-073-1/+88
| | | | Add mibs for hastd(1) queue stats.
* MFC r258901:sbruno2014-01-051-1/+1
| | | | | | | | svn r251516 resized the buf argument a bit too much. Pass a hardcoded size of 6 to humanize_number() to resolve this. PR: bin/184405 Submitted by: jhb
* MFC r259870:pluknet2014-01-021-2/+2
| | | | Do not truncate the ``command'' column in ``ps'' output.
* MFC 258063,258064,258066,258097,258185,259134:jhb2013-12-272-53/+219
| | | | | | | | | | | | | | - Add an -s option to the regression tests that specifies a path to an alternate etcupdate.sh script to test. This allows a non-installed version of the script to be tested more easily. - Add a pre-world mode of updating similar to the -p option that can be passed to mergemaster. - Fix a couple of issues with -F: - Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks. - Fix the -F option in the case that the only upstream change is a change in the FreeBSD ID and the local file is removed. - Refresh /etc/localtime after each update using tzsetup -r. - Regenerate /var/db/services.db when /etc/services changes.
* MFC 259013:jhb2013-12-241-16/+3
| | | | | | Fix the processor table entry structure to use a fixed-width type for 32-bit fields so it is the correct size on amd64. Remove a workaround for the broken structure from bhyve(8).
* MFC r256650: kldxref: Add static keyword to the new function only used in thejilles2013-12-221-1/+1
| | | | | | same file. The WARNS level is not such that the omission broke the build.
* MFC r259276,259468-259470,259472,259474,259476-259478,259480-259481,259570,dteske2013-12-194-311/+321
| | | | | | | | | | | | | | | | | | | | 259572, and 259597-259598... r259276: Fix bug in `services' script in adding dumpdev comment to rc.conf r259468: Ignore spurious escape generated by VMware's Ctrl-Cmd combination r259469: Mask errors in `config' script from newaliases(1) about non-FQHN r259470: Set atime=on for /var/mail zfsboot dataset to support mail server r259472: Accept NULL input for zfsboot SWAP to indicate SWAP of zero bytes r259474: Multiple changes, including bug-fixes and debugging improvements r259476: Change default ZFS disk layout, making it easier to resize r259477: fletcher4 is now the default (zfsboot related) r259478: De-uglify the geli(8)-setup infobox (zfsboot related) r259480: Fix ghosted zroot issue by always performing labelclear on swap r259481: Auto-enable 4k sector alignmet when geli(8) is enabled (zfsboot) r259570: Fix numerical comparison error (zfsboot) r259572: Mask spurious rm error in bsdinstall_log from `auto' script r259597: Fix zfsboot regression when installing to 3+ disks r259598: Set cachefile property of bootpool so it imports to new system
* MFC r259266:bdrewery2013-12-193-15/+186
| | | | | | | | | | | | | Fix multi-repository support by properly respecting 'enabled' flag. This will read the REPOS_DIR env/config setting (default is /etc/pkg and /usr/local/etc/pkg/repos) and use the last enabled repository. This can be changed in the environment using a comma-separated list, or in /usr/local/etc/pkg.conf with JSON array syntax of: REPOS_DIR: ["/etc/pkg", "/usr/local/etc/pkg/repos"] Approved by: bapt (mentor)
* MFC r259302,r259413grehan2013-12-182-2/+300
| | | | | | | | r259302 bhyve(8) man page r259413 mdoc: sort SEE ALSO
* MFC r259426, r259427:gjb2013-12-181-0/+3
| | | | | | | | | | | | | | | | | r259426: Add a pkg(8) repository configuration file for cdrom-based package installation. As part of the 'pkg-stage' target, copy the configuration file to the 'packages/repos/' directory on the DVD filesystem. r259427: Export 'REPOS_DIR' when the selected source medium for package installation is cdrom. This enables bsdconfig(8) to make use of the on-disc pkg(8) repository configuration, which fixes package selection and installation from the dvd installer. Sponsored by: The FreeBSD Foundation
* MFC r259132,r259133,r259143:eadler2013-12-161-1/+1
| | | | | | | | | | | | Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i' as a case insensitive flag. Add regression test for recently added 'i' flag in r259132. the i modifier was added in r259132 since POSIX recently agreed to add it. Switch uses of /I to /i. PR: standards/184641
* MFC r259113, r259115, r259144, r259148:gjb2013-12-143-4/+5
| | | | | | | | | | | | | | | | | | | | | r259113 (dteske): Fix failed attempt to send pkg(8) stderr to /dev/null r259115 (dteske): Prevent truncating /tmp/bsdinstall_log each time we exec a module. r259144 (dteske): Fix a regression after successfully installing to encrypted ZFS root, the passphrase is not accepted and a message about "incorrect key" is displayed. r259148 (dteske): Fix a regression resulting in mountroot prompt after attempting to install to encrypted ZFS root (caused by a typo in a variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME). Sponsored by: The FreeBSD Foundation
* MFC r258076, r258077:ian2013-12-141-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes 3 problems in syslogd related to sizing receive buffers... - A call was misplaced at the wrong level of nested if blocks, so that the buffers for unix domain sockets (/dev/log, /dev/klog) were never increased at all; they remained at a way-too-small default size of 4096. - The function that was supposed to double the size of the buffer sometimes did nothing, and sometimes installed a wildly-wrong buffer size (either too large or too small) due to an unitialized 'slen' variable passed to getsockopt(). Most often it doubled the UDP buffers from 40k to 80k because accidentally there would be harmless stack garbage in the unitialized variables. - The whole concept of blindly doubling a socket's buffer size without knowing what size it started at is a design flaw that has to be called a bug. If the double_rbuf() function had worked at all (I.E., if the other two bugs didn't exist) this would lead to UDP sockets having an 80k buffer while unix dgram sockets get an 8k buffer. There's nothing about the problem being solved that requires larger buffers for UDP than for unix dgram sockets -- the buffering requirements are the same regardless of socket type. This change renames the double_rbuf() function to increase_rbuf() and increases the buffer size on all types of sockets to 80k. 80k was chosen only because it appears to be the size the original change was shooting for, and it certainly seems to be reasonably large (I might have picked 64k in the absence of any historical guidance). Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially transient and shouldn't result in closing the socket and giving up forever.
* MFC r259182:trasz2013-12-131-0/+8
| | | | | | | | Fix handling for empty auth-groups. Without it, ctld child process would either exit on assertion, or, if assertions are not enabled, fail to authenticate the target. Sponsored by: The FreeBSD Foundation
* MFC r256657,r257018,r257347,r257423,r257729,r257767,grehan2013-12-1314-125/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257933,r258609,r258614,r258668,r258673,r258855 Pull in some minor bugfixes and functionality enhancements from CURRENT. These are candidates to be moved to 10.0-release. r258855 mdoc: quote string properly. r258673 Don't create an initial value for the host filesystem of "/". r258668 Allow bhyve and bhyveload to attach to tty devices. r258614 The 22-bit Data Byte Count (DBC) field of a Physical Region Descriptor was being read as a 32-bit quantity by the bhyve AHCI driver. r258609 Fix discrepancy between the IOAPIC ID advertised by firmware tables and the actual value read by the guest. r257933 Route the legacy timer interrupt (IRQ0) to pin 2 of the IOAPIC. r257767 Fix an off-by-one error when iterating over the emulated PCI BARs. r257729 Add the VM name to the process name with setproctitle(). r257423 Make the virtual ioapic available unconditionally in a bhyve virtual machine. r257347 Update copyright to include the author of the LPC bridge emulation code. hand-merge r257018 Tidy usage messages for bhyve and bhyveload. r256657 Add an option to bhyveload(8) that allows setting a loader environment variable from the command line. Discussed with: neel
* MFC r259156:eadler2013-12-131-2/+2
| | | | | | | | | mtest(8): use correct macro in mdoc The An macros is used for authors while the Ar macro is used for arguments. AFAIK mcast-addr and ifname are not authors. PR: docs/184649
* MFC r258927: Fix a regression introduced by SVN r257842 that preventsdteske2013-12-071-4/+6
| | | | | | Encryption from being enabled. Approved by: re (gjb)
* MFC r258842:trasz2013-12-051-2/+2
| | | | | | | Grammar fix. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r258841:trasz2013-12-051-3/+3
| | | | | | | Fix typos. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r258854:gjb2013-12-051-1/+1
| | | | | | | | Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since the format of 'pkg -vv' output has changed. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation
* MFC r258550:gjb2013-11-301-24/+0
| | | | | | | | Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
* MFC r258348:bdrewery2013-11-291-2/+2
| | | | | | | Document 'enabled' as boolean instead of string. Approved by: bapt (implicit) Approved by: re (gjb)
* MFC r257879:delphij2013-11-281-2/+2
| | | | | | | | | | | Fix typo in r256646: We want to generate lists of directories in INDEX-OLD and INDEX-NEW and compare them, not generate the same list of directories from INDEX-OLD twice... Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough Errata Notice: FreeBSD-EN-13:05.freebsd-update Approved by: re (gjb)
* MFC: r258456brooks2013-11-261-1/+7
| | | | | | | | | | | Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is nmtree. The mtree output used by mergemaster in this case was clearly not meant for computer consumption and an approach based on -f <file1> -f <file2> would probably be a better idea, but this is a minimal change. Approved by: re (glebius)
* MFC Revisions:dteske2013-11-2111-454/+1064
| | | | | | | | | | | | | | | | | 256549: man-page updates 256551: .Dd bump in manpage 256553: bootenv -> ROOT fix 257842: monster list of fixes 257843: minor touchup 257844: copy install log 257845: fixup to last 257872: mdoc fixup 257939: debug check 258021: MBR bootcode fixup Reviewed by: many Discussed on: -current Approved by: re (hrs)
* MFC r257755-257756,257780-257785,257787-257793, anddteske2013-11-2113-129/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 257795,257817,257819,257937-257938,258029,258263-258267: 257755: SRV records 257756: fix spurious error message 257780: Whitespace 257781: Comments and funny syntax 257782: Debug file truncation is optional 257783: f_show_err for debugging 257784: f_eval_catch for debugging 257785: fix size calculations bug 257787: fix broken HTTP "any" media type 257788: more debugging 257789: Comments 257790: fix printf usage bug 257791: f_[v]sprintf added 257792: Comments 257793: fix off-by-one error in size calcs 257795: Replace pkg-tools with pkgng 257817: fix cosmetic typos 257819: Use `pkg -vv' to get ABI 257937: Adjustment to last 257938: Adjustment to last 258029: Comments 258263: Shuffle code around 258264: Remove unused code 258265: Debugging. Use f_eval_catch with pkg 258266: Shutdown media on exit from packages 258267: Fix pkg install from DVD Reviewed by: many Discussed on: -current Approved by: re (hrs)
* Fix typo.trasz2013-11-141-2/+2
| | | | | Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* Merge r257945 from head:glebius2013-11-141-2/+2
| | | | | | Do not use just freed memory. Approved by: re (kib)
* Merge r257888, r258049 from head:glebius2013-11-141-5/+0
| | | | | | | | - Use system libiconv, instead of trying to dlopen() it. - Just disable recoding support in libsmb if built WITHOUT_ICONV. PR: 183153 Approved by: re (kib)
* MFC r257749:gjb2013-11-091-2/+9
| | | | | | | | | Switch to using pkg(8) for the doc install in bsdinstall(8). This also bootstraps the system with pkg(8) for future use. Approved by: re (delphij) PR: 183488 Sponsored by: The FreeBSD Foundation
* MFC r257668:bdrewery2013-11-071-2/+2
| | | | | | | Use proper capitalization for FreeBSD.org Approved by: bapt Approved by: re (gjb)
* MFC r257505:bdrewery2013-11-042-23/+61
| | | | | | | | | | | | | Add -f support to 'pkg bootstrap' and 'pkg add' to force installation of pkg(8) even if already installed. This is useful if you somehow messup pkg(8) and need to reinstall from remote with it already being registered in the pkg(8) /var/db/pkg database. Also add some sanity checks to 'pkg add'. Approved by: bapt Approved by: re (glebius)
* MFC r257378,r257400,r257402,r257440:bdrewery2013-11-032-1/+263
| | | | | | | Add a pkg(7) manpage for bootstrap Approved by: bapt Approved by: re (gjb)
* MFC r257377:bdrewery2013-11-031-0/+9
| | | | | | | | Add a 'pkg bootstrap' command which will bootstrap pkg(8) without forwarding any command to it after installation. Approved by: bapt Approved by: re (gjb)
* MFC r257379:trasz2013-11-022-39/+39
| | | | | | | | | | | | | | | | | Rename '-h' option to '-p', and use "portal" instead of "host" or "address", in order to be consistent with iSCSI terminology. Besides, calling the option '-h' was just wrong. This changes usage for newly added iscsictl(8), and two newly added subcommands to ctladm(8). This breaks POLA between CURRENT and 10, but since 10.0 has not been released yet, it's still ok to do. MFC r257380: Bump .Dd after r257379. Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
* MFC r256540, r256544:gjb2013-11-011-1/+9
| | | | | | | | | | | | r256540 (dteske): Add loader.conf(5) entries to import bootpool after boot when using full-disk encryption and ZFS. r256544 (dteske): Fix loader.conf(5) entries from r256540. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation
* MFC r256865brooks2013-10-314-212/+0
| | | | | | | | | Remove the isf(4) driver. It was created by accident and is subset of the cfi(4) driver. It remained in the tree longer than would be ideal due to the time required to bring cfi(4) to feature parity. Sponsored by: DARPA/AFRL Approved by: re (gjb)
* MFC r257092grehan2013-10-301-31/+85
| | | | | | | | | | Fix bug in the ioapic emulation for level-triggered interrupts, where a pin assertion while a source was masked would result in the interrupt being lost, with the symptom being a console hang. The condition is now recorded, and the interrupt generated when the source is unmasked. Approved by: re (glebius)
* MFC r257293.neel2013-10-3013-596/+1103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for PCI-to-ISA LPC bridge emulation. If the LPC bus is attached to a virtual machine then we implicitly create COM1 and COM2 ISA devices. Prior to this change the only way of attaching a COM port to the virtual machine was by presenting it as a PCI device that is mapped at the legacy I/O address 0x3F8 or 0x2F8. There were some issues with the original approach: - It did not work at all with UEFI because UEFI will reprogram the PCI device BARs and remap the COM1/COM2 ports at non-legacy addresses. - OpenBSD GENERIC kernel does not create a /dev/console because it expects the uart device at the legacy 0x3F8/0x2F8 address to be an ISA device. - It was functional with a FreeBSD guest but caused the console to appear on /dev/ttyu2 which was not intuitive. The uart emulation is now independent of the bus on which it resides. Thus it is possible to have uart devices on the PCI bus in addition to the legacy COM1/COM2 devices behind the LPC bus. The command line option to attach ISA COM1/COM2 ports to a virtual machine is "-s <bus>,lpc -l com1,stdio". The command line option to create a PCI-attached uart device is: "-s <bus>,uart[,stdio]" The command line option to create PCI-attached COM1/COM2 device is: "-S <bus>,uart[,stdio]". This style of creating COM ports is deprecated. Approved by: re (glebius)
* MFC: r256770,r257142,r257145,r257146,r257147,r257148,bdrewery2013-10-294-89/+788
| | | | | | | | | | | | | | | | | | | | | r257149,r257150,r257158,r257159,r257164,r257168, r257193 - Support checking signature for pkg bootstrap from remote and for 'pkg add ./pkg.txz' - Be verbose on where pkg is being bootstrapped from. - Add support for reading configuration files from /etc/pkg. For now only /etc/pkg/FreeBSD.conf is supported. - Add test package signing key fingerprint into /etc/keys/pkg/trusted. - Disable fingerprint checking by default for now as the official packages are not yet signed. Approved by: bapt Approved by: re (glebius)
* MFC r257051:bdrewery2013-10-293-1/+9
| | | | | | | | | | | Add support for using "pkg+http://" for the PACKAGESITE. pkg 1.2 is adding this support as well. This should help lessen the confusion on why the default SRV PACKAGESITE does not load in a browser. Approved by: bapt Approved by: re (glebius)
* MFC: r256968, r256971, r256978bapt2013-10-293-3/+108
| | | | | | | | | | | | Improve SRV records support for the pkg(8) bootstrap: - order srv records by priorities - for all entries of the same priority, order randomly respect the weight - select the port where to fetch from respect the port provided in the SRV record Allow to bootstrap by doing pkg add ./a/path/to/a/pkg_package.txz Approved by: re (glebius)
* MFC r256646, r256767, r257038:cperciva2013-10-261-8/+25
| | | | | | | | | | | | | | | | When installing updates, install new directories first and remove old directories last. Allow ~ in file names so libtool droppings in contrib don't break updates. It has happened twice now, and is likely to happen again. Be more selective when filtering for lib*.so.N files. These are deleted at the end of the upgrade process, after warning users to upgrade any 3rd party software (e.g., from the ports tree) which might link to the libraries being removed. Approved by: re (gjb) Errata Notice: FreeBSD-EN-13:04.freebsd-update
* MFC r256926, r257005grehan2013-10-252-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | r256926 Fix AHCI ATAPI emulation when backed with /dev/cd0 - remove assumption that the backing file/device had 512-byte sectors - fix incorrect iovec size variable that would result in a buffer overrun when an o/s issued an i/o request with more s/g elements than the blockif api r257005 Export the block size capability to guests. - Use #defines for capability bits - Export the VTBLK_F_BLK_SIZE capability - Fix bug in calculating capacity: it is in 512-byte units, not the underlying sector size This allows virtio-blk to have backing devices with non 512-byte sector sizes e.g. /dev/cd0, and 4K-block harddrives. Approved by: re (glebius)
* MFC r256450:bdrewery2013-10-232-3/+6
| | | | | | | | Rename libbsdyml to libyaml, make private, and bump SHLIB_MAJOR to 1.0 Approved by: bapt Approved by: re (glebius)
OpenPOWER on IntegriCloud