summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig
Commit message (Collapse)AuthorAgeFilesLines
* MFC r278493: Update copyrights.dteske2015-03-056-6/+6
|
* MFC r278491: Add bsdconfig api function f_dialog_menutag2help()dteske2015-03-051-0/+33
|
* MFC r278490:dteske2015-03-051-0/+50
| | | | Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel()
* MFC r278489: Eliminate sub-shells where possible for performance.dteske2015-03-053-41/+89
|
* MFC r278488: Whitespace.dteske2015-03-051-2/+1
|
* MFC r278483: Comments.dteske2015-03-051-1/+1
|
* MFC r278470:dteske2015-03-051-0/+1
| | | | | Add new alias "bsdconfig api" (same as "bsdconfig includes") NB: My fingers like typing "api" a lot more than "includes"
* MFC r278467:dteske2015-03-051-1/+1
| | | | Replace the only instance of sed(1) in bsdconfig(8) with awk(1).
* MFC r274073:dteske2015-03-0539-119/+0
| | | | | | | | Follow-up to r255036; remove beforeinstall directives from bsdconfig(8) Makefile's, fixing concurrent installworld (`make -j17 installworld'). Reviewed by: delphij Thanks to: delphij, emaste
* MFC r273068:dteske2015-03-053-6/+6
| | | | | | Rename awk(1) implementation of GNU awk's built-in asorti() function to prevent fatal conflict should one-true-awk ever be replaced -- e.g., in an appliance -- with GNU awk. NB: Renamed my implementation to _asorti()
* MFC r273067:dteske2015-03-053-2/+7
| | | | Fix awk(1) asorti() implementation to work when called in a loop.
* MFC revisions 268999, 269027, 269351-269352, 269354, 269460, 270283,dteske2014-09-2716-178/+236
| | | | | | | | | | | | | | | | 270505, 270954, and 270989: r268999: Add new bsdconfig example scripts; remove obsolete ones r269027: Update bsdconfig dot module; fixes and enhancements r269351: Add setvar() for non-FreeBSD platforms using bash as /bin/sh r269352: Fix syntax error when run under bash r269354: Update setvar() function introduced in r269351 r269460: Update f_xdialog_info() in bsdconfig's dialog.subr include r270283: Add `-A' flag to pkg-install(8) when installing dependencies r270505: Optimize f_which() to be slightly faster still (common.subr) r270954: Update f_dialog_init() for safer getopts usage (dialog.subr) r270989: Fix for previously mentioned r270954 Approved by: re (gjb)
* MFC r270647: Add references to vt(4) and the configuration files in /usr/shase2014-09-041-0/+11
| | | | | | | | | | | | | | | | | | | | | | MFC r270653: Update man-pages to correctly refer to changed pathes and namin MFC r270657: More man pages that need to know about vt in addition to syscon MFC r270659: (by pluknet@) Missed comma. MFC r270660: Back-out the references to vt(4) from this man-page. It appears MFC r270933: Add references to vt(4) to further man-pages. MFC r270934: Final patches to the tools used to convert syscons keymaps for MFC r270935: Add vt(4) support to the console initialisation script, specifi Second batch of MFCs to add support for Unicode keymaps for use with vt(4). It contains the following changes: - Add references to vt(4) to relevant man-pages. - Update comment in defaults/rc.conf to mention vt - Update rc.d/syscons to warn about syscons keymaps used under vt. An attempt is made to identify the vt keymap to load instead. - Minor changes to the conversion tool based on mail comments on keymaps. Relnotes: yes
* MFC r267680:dteske2014-07-021-1/+1
| | | | | | Fix a code typo that prevented mkdir from firing (unnoticed usually because another part of the code succeeded in making the same directory).
* MFC r266297: Update example portion of comment to coincide with r264840dteske2014-05-221-1/+2
|
* MFC r264840: Implement GEOM based media device classification.dteske2014-05-1722-771/+1579
|
* MFC revisions 260894,260899,262895-262902,262904,262908-262910,262982,dteske2014-04-0124-1580/+3085
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 262984,263133-263137,263139,263141,263144-263150, and (partially) 263249 (31 revisions; summarized below)... r260894: Optimize f_expand_number(), improving performance r260899: s/__number/__num/ in f_expand_number() r262895: Allow dispatched reswords to carry arguments r262896: Add missing local declaration r262897: Fix a typo in a comment r262898: Fix incorrect return status if var_to_set and var_to_get are same r262899: Make f_show_err non-fatal r262900: Centralize function name; Update a comment while here r262901: s/__num/__number/ in f_expand_number() r262902: Comment to go with NL global introduced by previous commit r262904: Rewrite groupmgmt -- hooking it into the scripting system r262908: Change dispatch words from group* to *Group for backward compat r262909: Fix copy/paste error in a comment r262910: Take a group name on the command-line if available r262982: Whitespace r262984: Remove vestigial global, no longer used since r262904 r263133: Remove indexfile from debug statement (already logged) r263134: Add debug statement just before attempting to exec a module r263135: Comments r263136: Update copyright r263137: Fix future namespace issues for functions taking $var_to_set r263139: Remove useless NULL string in compound strings r263141: Pointy hat! Fix a broken f_isinteger() r263144: Fix a code-typo that prevented auto-sizing of a dialog r263145: Fix comments and whitespace r263146: Reduce the sleep cycle when using dialog(1) [infobox] to 1-second r263147: Fix a bug preventing errors from pw(8) from appearing r263148: For non-interactive scripts, forgot to check argument r263149: Add protection against input containing single-quotes r263150: Rewrite usermgmt r263249: (partial) Add more obsolete files
* 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 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 r259113, r259115, r259144, r259148:gjb2013-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | 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 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 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)
* MFC r256391:dteske2013-10-121-24/+34
| | | | | | Fix signed integer overflow detection in f_expand_number() of strings.subr. Approved by: re (glebius)
* MFC revisions 256321-256323,256331,256333,256335,256343:dteske2013-10-117-26/+506
| | | | | | | | | | | | | | | | | | | | | | | | Bring in a new zfsboot auto script for performing automatic setup of a boot pool (optionally encrypted) with many other options, validations, features. Originally submitted by Allan Jude; modified in collaboration. MFC revisions 256325,256330,256345: Rewrite the keymap selection menu to display keymaps and provide a test mechanism. Test mechanism originally submitted by Warren Block; modified. MFC r256347: Prominently display "Wireless" for each wireless network interface. Part of PR bin/161547; submitted by Warren Block; slightly modified. MFC r256348: Remove the dumpdev configuration dialog, merge it into the regular services configuration and enable it by default. Originally submitted by Allan Jude; slightly modified. PR: bin/161547 Submitted by: Allan Jude, Warren Block <wblock@wonkity.com> In collaboration with: Allan Jude <freebsd@allanjude.com> Approved by: re (glebius)
* Introduce centralized [X]dialog(1) exit codes to `dialog.subr' and make-usedteske2013-10-0947-206/+208
| | | | | | | | | | throughout the bsdconfig(8) code. While we're here, add an explicit argument to lvalue-seeking invocations of "return" that previously had no argument. Also, consolidate a single instance of double-newline and remove some comments that are no longer required (given increased readability with new exit codes). Approved by: re (glebius)
* Remove ftp5.se.f.o, as per request to -hubs@gavin2013-09-281-1/+0
| | | | | Approved by: re (glebius) MFC after: 3 days
* - Remove the is (Iceland) mirror per mail from the admins.brd2013-09-271-1/+0
| | | | | Approved by: re With hat: clusteradm@
* Fix a bug in HTTP checking/fetching.dteske2013-09-234-4/+38
| | | | | | | | | | Fix a bug in HTTP checking/fetching. Add Main Site to HTTP menu. Add new example script browse_packages_http.sh and move existing example script browse_packages.sh -> browse_packages_ftp.sh Reviewed by: gjb, brd Approved by: re (gjb), clusteradm (brd) MFC after: 3 days
* Remove unnecessary mediaClose (FTP operations are done with either ftp(1)dteske2013-09-071-1/+0
| | | | | or fetch(1), neither of which are stateful, compared to how sysinstall(8) did FTP operations, maintaining an open session until mediaClose).
* Long URLs don't always appear even with autosizing and other tricks. So,dteske2013-09-071-1/+1
| | | | add some whitespace to put the URL on a line by itself, maximizing view.
* Remove ftp2.tr.freebsd.org, it is out of date.gavin2013-07-232-2/+0
| | | | MFC after: 3 days
* Sync-up with bsdinstall(8) FTP mirrorselect changes.dteske2013-07-222-53/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVN r224656: Add back ftp4, a new machine has taken its place. ftp2 and ftp8 are both IPv6 capable mirrors. cvsup4/ftp4 have already been added to the handbook. NOTE: Except put IPv6 entries in IPv6 section at the top of the list SVN r225467: Add ftp4.se.freebsd.org to the IPv4 and IPv6 mirror lists. SVN r235228: Add the IPv6 tag to ftp4.fr.freebsd.org. NOTE: Except dup entry into IPv6 section. SVN r243832: - Remove snapshots.se.freebsd.org [1] - Add ftp6.se.freebsd.org SVN r243854: Remove snapshots.jp.freebsd.org. It stopped working years ago. SVN r253543: Update mirror list to more closely match http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html MFC after: 1 week
* Re-implement $probe_only aspect of f_media_get_TYPE() (where TYPE is cdrom,dteske2013-07-1412-81/+159
| | | | | | | | | | | | | | | | | | | | | | | nfs, ftp, http, httpproxy, etc.) and f_device_get() (abstract method for calling aforementioned f_media_get_TYPE()). Previously, if $probe_only was present and non-NULL, the TYPE functions would check for $file and exit with an appropriate error status (success if the file exists and readable, failure otherwise). While this has been retained, a pair of globals has been introduced: $PROBE_EXIST and $PROBE_SIZE (see `/usr/share/bsdconfig/media/common.subr') The $PROBE_EXIST global can be used where you need the functionality of simply testing for existence (previously the _only_ functionality). Meanwhile, the new $PROBE_SIZE global can be used to cause the TYPE function to print the size of the file (in bytes) on standard-out (or -1) if not found or an error occurs. NOTE: If an error occurs, it is logged with the dprintf function, which is visible with `-d' flag or debug=1. In many cases, where you need to get the size of a file _and_ check for its existence, you can use the return status of a $PROBE_SIZE call.
* Introduce a new [yet unused] function for [efficiently] getting the path todteske2013-07-101-0/+29
| | | | | | | | | | | an executable by-name without forking or using externals. In a performance benchmark of 10,000 runs on circa 2006 hardware, f_which out-performed `which' with an average completion time of ~2.5 seconds versus ~56 seconds. This should be handy for future use (not that I make it a habit to call `which' in a loop 10,000 times).
* Adjust comments to fit within 80-columns.dteske2013-07-091-4/+4
|
* Fix conditional (der should match the comment above it).dteske2013-07-091-1/+1
| | | | MFC after: 1 day
* Do two things: First, don't obscure the backtitle. Second, read ~/.dialogrcdteske2013-07-091-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | if it exists to determine if use_shadow is true (ON) or false (OFF). The purpose of determining the value of use_shadow is to know how many lines to subtract from the maximum height value in assuring that the backtitle is not obscured. The detriment of obscuring the backtitle is that it provides information that is not easily obtained elsewhere. That is the command-line shortcut used to access the current menu. As you navigate from one dialog to the next, invariably transparently corssing module boundaries, the backtitle represents the command-line argument used to get there. Obscuring this information with a widget that is too-tall and/or too-wide would see that data go unnoticed (leaving few other ways to get that information in the same helpful context). So despite the fact that this change reduces the standard maximum height for all widgets, there is a trap-door to prevent this calculation. If you want to utilize the full screen height on the terminal (remember, this adjustment is not made for Xdialog(1)) you can set $NO_BACKTITLE to 1 (or any non-NULL value for that matter) and this calculation will be skipped. You will be able to draw a widget that partially obscures the backtitle if-necessary. MFC after: 1 day
* Fix typos in the BSD License.dteske2013-07-0789-177/+177
|
* Be consistent with other usr.sbin programs w/respect to the copyrightdteske2013-07-071-1/+1
| | | | wording ("All rights reserved."); I had the casing wrong on many instances.
* Be consistent with other usr.sbin programs w/respect to the copyrightdteske2013-07-0788-88/+88
| | | | wording ("All rights reserved."); I had the casing wrong on many instances.
* Don't prevent the user from hanging their system by changing networkdteske2013-07-056-17/+16
| | | | | settings while NFS mounts are active; but DO warn them and make the default action to do nothing. (thanks julian)
* Check for INDEX file first before anything else when processing modules.dteske2013-07-051-0/+2
|
* Check menuitem before calculating tag.dteske2013-07-051-2/+2
|
* Add the necessary code to reinstall packages. Both scripted accessdteske2013-07-052-1/+11
| | | | | | | | | | | (packageReinstall) and UI access have been tested successfully with a variation of different situations including: + Reinstall a package for which no other packages depend + Purposefully do thinks like reinstall a package that is not installed + Try to reinstall a package which other installed packages still depend NOTE: There is no "force" used; if a package is required by other packages, it will not be uninstalled (and therefore no reinstall is done).
* Remove superfluous continue at end of loop. (pointy-hat)dteske2013-07-051-1/+1
|
* Add support for processing add-on modules from /usr/local/libexec/bsdconfigdteske2013-07-052-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (this is designed to allow new modules to be installed via ports/packages). To prevent conflict with itself (sysutils/bsdconfig) as a port (which installs its base modules to the above directory, it was long-ago decided that so-called `base' modules would look different than now-defined `add-on' modules. The structure of the contents for each is the same, but the naming convention for the module directory must be different. Base modules are named `[0-9][0-9][0-9].*' to allow SysV-style organization while add-on modules must avoid this naming style and are simply listed in alphabetical order by their module directory. For example, a hypothetical port named `bsdconfig-jails' could install /usr/local/libexec/bsdconfig/jails and provide `bsdconfig jails' as well as a new menu entry in the main-menu. Add-on modules are listed in the main-menu (when bsdconfig is executed with- out arguments) below a separator after the last base-module. In `bsdconfig -h' output, add-on modules are listed right alongside base modules (sorted alphabetically in columnar fashion; left-to-right). If a base module declares a keyword used by an add-on module, the base module will always win when given `bsdconfig keyword' syntax. Add-on modules should avoid declaring any keyword found in `script.subr' as a reserved-word (`Resword') since bsdconfig also supports `bsdconfig resword' as a fall-back if no keyword is found to be declared by any module.
* Oops, r252833 was not supposed to touch this file. Back-out and recommitdteske2013-07-051-13/+3
| | | | this file with the rest of the files it was supposed to go with.
* Don't calculate the tag until we know that we're going to make a new menudteske2013-07-052-8/+17
| | | | item entry. Also join simple NULL assignments into a single line.
OpenPOWER on IntegriCloud