366259 |
29-Sep-2020 |
zeising |
MFC r366186: bsdconfig, bsdinstall: Prune dead mirrors
Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall. All these return NXDOMAIN when trying to resolve them.
Approved by: emaste |
358516 |
02-Mar-2020 |
philip |
MFC r358418:
bsdconfig: remove the Italian mirror
ftp.it.FreeBSD.org has been down for several years.
PR: 244481 Reported by: xgeoplasma6@gmail.com |
335488 |
21-Jun-2018 |
dteske |
MFC r335306: bsdconfig: Make examples optional
PR: bin/228485 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Reported by: Dmitry Wagin <dmitry.wagin@ya.ru> Sponsored by: Smule, Inc. |
335485 |
21-Jun-2018 |
dteske |
MFC r335308: bsdconfig: Fix a bug when editing users
The usermgmt API was stomping on a global ($user_gid to be specific) so things would appear to work fine until you tried to make a second pass into the API with the now-tainted variable contents.
Fixed by localizing menu-specific contents as to not leak outside API.
PR: bin/208774 Reported by: Martin Waschbuesch <martin@waschbuesch.de> Sponsored by: Smule, Inc. |
335484 |
21-Jun-2018 |
dteske |
MFC r335280-r335281, r335302: sysrc.subr updates
r335280: Fix handling of files with missing newline at EOF r335302: Fix a comment for accuracy
PR: bin/203435 Reported by: Andreas Sommer <andreas.sommer87@googlemail.com>
r335281: Fix display when value is "-n"
PR: bin/226406 Reported by: Marius Halden <marius.halden@modirum.com>
Sponsored by: Smule, Inc. |
335408 |
20-Jun-2018 |
dteske |
MFC r330878-r330879, r330939, r330948: Man-page updates
r330878: Fix typo and lint/igor warnings r330879: Fix lint/igor warnings r330939: Use full month in dpv(3), figpar(3), and bsdconfig(8) manuals r330948: Bump copyright following recent changes
Sponsored by: Smule, Inc. |
330318 |
03-Mar-2018 |
eadler |
MFC r318891:
Fix long standing issue in bsdconfig's keymap selection
Since the translation to vt as terminal emulator, the keymaps files path has changed and this change does not get followed in bsdconfig. This implicates boot time warnings about a wrong keymap file, what is very confusing for the new users and for me too, so initialize the default keymaps search path depending on terminal type. |
309899 |
12-Dec-2016 |
dteske |
MFC r307402: Guard against bad service name argument(s) to load_rc_config() |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
301973 |
16-Jun-2016 |
dteske |
Add bsdconfig `wifi' (aka `wireless' or `wlan') module
Approved by: re (gjb) MFC after: 8 weeks Relnotes: yes
|
300050 |
17-May-2016 |
eadler |
Don't repeat the the word 'the'
(one manual change to fix grammar)
Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
|
298884 |
01-May-2016 |
pfg |
usr.sbin/bsdconfig: minor spelling fixes on comments.
No functional change.
|
295197 |
03-Feb-2016 |
dteske |
f_substr(): Optimized recipe if running under bash
This makes runnig f_substr() faster than it was when running under bash, but both sh and dash are still faster when using the non-bash recipe which features dynamically unrolled loops.
|
295196 |
03-Feb-2016 |
dteske |
Remove SIG prefix from trapped signals
Makes traps functional if running under shells/dash
|
295195 |
03-Feb-2016 |
dteske |
f_substr: Write to stdout when no `-v var_to_set'
Fixes ``setvar: : bad variable name''
|
295194 |
03-Feb-2016 |
dteske |
Remove trailing whitespace
|
295180 |
03-Feb-2016 |
dteske |
Define f_sprintf() dynamically at inclusion time
No need to check/re-check capabilities that won't change at runtime.
|
295108 |
01-Feb-2016 |
dteske |
Utilize new `-v var_to_set' of f_snprintf()
|
295106 |
31-Jan-2016 |
dteske |
Move awk(1)-dependent recipes to the bottom
|
295105 |
31-Jan-2016 |
dteske |
Move f_isinteger() to the top
Grouping builtins-only algos together
|
295104 |
31-Jan-2016 |
dteske |
Move f_vsprintf() below f_sprintf()
Variable argument versions grouped with standard versions
|
295103 |
31-Jan-2016 |
dteske |
Move f_sprintf() above f_snprintf()
Ordering functions by appearance of use
|
295102 |
31-Jan-2016 |
dteske |
Optimize f_substr() to use built-ins only
Change f_snprintf() to use optimzed f_substr()
|
295101 |
31-Jan-2016 |
dteske |
Optimize f_sprintf() for bash
bash lacks the ksh93 optimization that makes sub-shells fast if they do not alter io. bash 3.1-alpha1 introduced printf -v var_to_set which is not as fast but is still significantly faster than var_to_set=$( printf ) when using any version of bash. If we find our interpreter to somehow be bash by invocation or inclusion, use the feature that provides fastest results.
|
295100 |
31-Jan-2016 |
dteske |
Reset OPTIND to 1 in f_device_find()
|
294880 |
27-Jan-2016 |
dteske |
Replace awk with more efficient builtins-only algo
|
294866 |
27-Jan-2016 |
dteske |
Use dpv(1) in `bsdconfig packages'
|
294865 |
27-Jan-2016 |
dteske |
Fix ABI parsing
|
294864 |
27-Jan-2016 |
dteske |
Change incorrect path
|
294669 |
24-Jan-2016 |
dteske |
Fix a typo in a comment
MFC after: 3 days X-MFC-to: stable/10
|
293617 |
09-Jan-2016 |
dteske |
Fix improper duration for f_dialog_pause() API
MFC after: 3 days X-MFC-to: stable/10
|
291563 |
01-Dec-2015 |
bdrewery |
META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable.
Currently rescue/rescue and sys/modules are still not connected.
Sponsored by: EMC / Isilon Storage Division
|
291347 |
26-Nov-2015 |
bdrewery |
META MODE: These need object directories to handle staging.
Sponsored by: EMC / Isilon Storage Division
|
291081 |
19-Nov-2015 |
bdrewery |
Rename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk target 'make includes'.
The file is still installed to /usr/libexec/bsdconfig/includes/includes.
MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
|
290693 |
12-Nov-2015 |
dteske |
Add support for "rc.conf.d" file(s).
Differential Revision: https://reviews.freebsd.org/D3551 Reviewed by: allanjude MFC after: 1 week X-MFC-to: stable/10 X-MFC-with: 290337 Relnotes: yes
|
289677 |
21-Oct-2015 |
eadler |
Fix a ton of speelling errors
arc lint is helpful
Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337
|
288226 |
25-Sep-2015 |
bdrewery |
META_MODE: Remove DEP_RELDIR from Makefile.depend files.
This has not been needed since r284171 in projects/bmake.
Sponsored by: EMC / Isilon Storage Division
|
287803 |
14-Sep-2015 |
dteske |
Fix code typo (no functional change)
MFC after: 3 days X-MFC-to: stable/10
|
284609 |
19-Jun-2015 |
dteske |
Interim fix for "Login not found" error.
PR: bin/196514 MFC after: 3 days X-MFC-to: stable/10
|
284345 |
13-Jun-2015 |
sjg |
Add META_MODE support.
Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796 Reviewed by: brooks imp
|
280921 |
31-Mar-2015 |
dteske |
Fix typo in a comment.
MFC after: 3 days X-MFC-to: stable/10 stable/9
|
278616 |
12-Feb-2015 |
cperciva |
Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin; update paths; and include everything in the "base" distribution.
The "games" distribution being optional made sense when there were more games and we had small disks; but the "games-like" games were moved into the ports tree a dozen years ago and the remaining "utility-like" games occupy less than 0.001% of my laptop's small hard drive. Meanwhile every new user is confronted by the question "do you want games installed" when they they try to install FreeBSD.
The next steps will be:
2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and caesar cipher (caesar, rot13) utilities. I intend to keep fortune, factor, morse, number, primes, and random, since there is evidence that those are still being used.
3. Merging src/games into src/usr.bin.
This change will not be MFCed.
Reviewed by: jmg Discussed at: EuroBSDCon Approved by: gjb (release-affecting changes)
|
278493 |
10-Feb-2015 |
dteske |
Update copyrights.
|
278492 |
10-Feb-2015 |
dteske |
Add "vt_"* aliases to bsdconfig console entries. NB: "syscons_"* kept for backward compatibility
|
278491 |
10-Feb-2015 |
dteske |
Add bsdconfig api function f_dialog_menutag2help()
|
278490 |
10-Feb-2015 |
dteske |
Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel()
|
278489 |
10-Feb-2015 |
dteske |
Eliminate sub-shells where possible for performance.
MFC after: 7 days
|
278488 |
10-Feb-2015 |
dteske |
Whitespace.
MFC after: 3 days
|
278483 |
10-Feb-2015 |
dteske |
Comments.
MFC after: 3 days
|
278470 |
09-Feb-2015 |
dteske |
Add new alias "bsdconfig api" (same as "bsdconfig includes") NB: My fingers like typing "api" a lot more than "includes"
MFC after: 3 days
|
278467 |
09-Feb-2015 |
dteske |
Replace the only instance of sed(1) in bsdconfig(8) with awk(1).
MFC after: 3 days
|
278465 |
09-Feb-2015 |
dteske |
Revert SVN r278464 -- fingers were in perforce mode (premature commit of future stuffs not yet ready).
|
278464 |
09-Feb-2015 |
dteske |
Replace the only instance of sed(1) in bsdconfig(8) with awk(1).
MFC after: 3 days
|
274394 |
11-Nov-2014 |
dteske |
Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.
Recommended by: cperciva Reviewed by: cperciva Relnotes: tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC
|
274331 |
09-Nov-2014 |
melifaro |
Renove faith(4) and faithd(8) from base. It looks like industry have chosen different (and more traditional) stateless/statuful NAT64 as translation mechanism. Last non-trivial commits to both faith(4) and faithd(8) happened more than 12 years ago, so I assume it is time to drop RFC3142 in FreeBSD.
No objections from: net@
|
274073 |
04-Nov-2014 |
dteske |
Follow-up to r255036; remove beforeinstall directives from bsdconfig(8) Makefile's, fixing concurrent installworld (`make -j17 installworld').
Thanks to: delphij, emaste Reviewed by: delphij MFC after: 3 days X-MFC-to: stable/10, stable/9
|
273068 |
14-Oct-2014 |
dteske |
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 after: 3 days X-MFC-to: stable/10, stable/9
|
273067 |
14-Oct-2014 |
dteske |
Fix awk(1) asorti() implementation to work when called in a loop.
MFC after: 3 days X-MFC-to: stable/10, stable/9
|
270989 |
02-Sep-2014 |
dteske |
Fix regression introduced by SVN r270954. Correct way to reset getopts is to set OPTIND to 1, not unset it (which causes an error).
Thanks to: jilles
|
270954 |
01-Sep-2014 |
dteske |
Fix a bug where command line arguments could be misprocessed if getopts is used prior to f_dialog_init() -- e.g., in a script that sets DIALOG_SELF_INITIALIZE to NULL, preventing f_dialog_init() from being run automaticaly when `dialog.subr' is included. Caused by sub-shell processing of arguments inheriting prior value of $OPTIND, used by getopts. Solved by unsetting OPTIND prior to [re-]processing of positional arguments.
|
270657 |
26-Aug-2014 |
se |
More man pages that need to know about vt in addition to syscons.
MFC after: 3 dayS
|
270505 |
24-Aug-2014 |
dteske |
Optimize f_which() to be slightly faster still.
|
270283 |
21-Aug-2014 |
dteske |
Add `-A' flag to pkg-install(8) invocation when installing dependencies.
MFC after: 3 days X-MFC-to: stable/10, stable/9 Reported by: gjb Discussed with: jelischer, gjb, bdrewery
|
269460 |
03-Aug-2014 |
dteske |
Add required `exec' before Xdialog(1) invocation for the case where we expect (require) data on stdin. The effect of this is that, when backgrounded, $! returns the pid of an Xdialog(1) instance instead of an sh(1) instance -- the difference being a later kill of $! will reach the Xdialog(1) instance whereas without the exec the kill succeeds on the sh(1) instance leaving Xdialog(1) open.
|
269354 |
31-Jul-2014 |
dteske |
Update command and add check for edge-case.
|
269352 |
31-Jul-2014 |
dteske |
Fix a syntax error when running under bash(1) for portability.
|
269351 |
31-Jul-2014 |
dteske |
Define a setvar() function for platforms using a shell unlike FreeBSD's sh(1) for `/bin/sh' (e.g., bash(1) which lacks a setvar definition). This is to improve portability to other Operating Systems (e.g., Linux).
|
269027 |
23-Jul-2014 |
dteske |
Fix a bug where include file `networking/services.subr' was not being properly clustered.
Change `fixedsize' to `fixedsize = true' to satisfy newer versions of dot(1) generating error "Warning: <stdin>: syntax error in line 27 near ','".
Remove bounding cluster surrounding various include-groupings, allowing groups of include files to float freely to the greatest consumer (reducing the density of rendered diagrams).
While here, change the bgcolor of include clusters from white to X11 color `thistle' (a light purple).
Also, add the word "Subroutines" after include cluster labels.
Do not terminate the digraph definition with a semi-colon [;] after the ending brace to satisfy newer versions of dot(1) generating error "Warning: <stdin>: syntax error in line 940 near ';'".
MFC after: 3 days X-MFC-to: stable/10, stable/9
|
268999 |
22-Jul-2014 |
dteske |
Add example script `add_some_packages.sh', demonstrating how to install a list of packages using the bsdconfig(8) API, providing dialog(8) based user experience (versus plain console output were you to use pkg(8) directly to install the same list of packages).
Remove example script `browse_packages_ftp.sh', made obsolete because the digests.txz and packagesite.txz databases for pkg(8) are not available via FTP (HTTP only to pkg.freebsd.org SRV hosts).
Update example script `browse_packages_http.sh', made to work with new pkg(8) demonstrating how to generate a local package repository.
Fix a bug in `bsdconfig packages' where packages were listed twice. This fix requires pkg(8) version 1.2.7_4 or higher.
NB: It is the introduction of pkg(8) 1.2.7_4 wherein I am also able to drastically reduce the generation time of package dependencies prior to the dialog display (by utilizing the new `-I' flag to pkg-rquery(8)).
While here, fix a positional argument nit for f_index_initialize() of `packages/index.subr' include (the one and only argument is positional argument 1 to state the by-ref handle, indicating the variable to set in the caller's namespace; the nit I'm fixing here is that we were querying positional argument 2 for this information incorrectly; caused by a missing hunk back around SVN r257795).
Fix a bug in sysrc(8) described by PR bin/187458 "sysrc(8) silently and unexpectedly bootstraps pkg". This was caused by an explicit entry in `/usr/share/bsdconfig/common.subr' (used by sysrc(8)) that called pkg(8) to populate the $PKG_ABI global (called in a way that allows implicit bootstrap of pkg(8)). The solution to which was to find every place in bsdconfig(8) that requires the $PKG_ABI global and add a layer of protection by way of introducing the new API call f_musthavepkg_init() (provided by new include, `/usr/share/bsdconfig/packages/musthavepkg.subr' intented to mirror `/usr/share/bsdconfig/mustberoot.subr'). When the $PKG_ABI global is required, you can use `f_musthavepkg_init' to cause graceful premature termination in the event that pkg(8) has not yet been bootstrapped, and thus cannot be used to populate $PKG_ABI.
NB: If running interactively ($nonInteractive is NULL or unset), the f_musthavepkg_init() API call will attempt to bootstrap pkg(8), but only if the user chooses "Yes" to a Yes/No dialog confirming it is ok to bootstrap.
While here, simplify an if-conditional in `media/http.subr' include to use sh(1) inline assignment-with-break.
Also, fix a bug in `media/http.subr' and `media/httpproxy.subr' wherein the error messages for various HTTP failures were not finding their way to the console (needed to pass stdout to pass-thru descriptor).
While here, remove the executable bit from `packages/categories.subr', `packages/index.subr', and `packages/packages.subr' includes.
Fix issues where pkg(8) complains about PACKAGESITE being defined. Previously, we would set $PACKAGESITE and export it. Now we only set $PACKAGESITE for invocations of "pkg update" -- getting rid of all the spurious warnings about PACKAGESITE being deprecated (it's still used in the case of "pkg update" for simplicity versus having to configure a config-file).
Remove the leading argument from invocations of f_index_initialize() in `packages/packages.subr' include. The leading argument no longer means what it used to, pre SVN r257995).
PR: bin/187458 Reviewed by: nwhitehorn MFC after: 1 week X-MFC-to: stable/10, stable/9
|
267680 |
20-Jun-2014 |
dteske |
Fix a code typo that prevented mkdir from firing (unnoticed usually because another part of the code succeeded in making the same directory).
MFC after: 3 days
|
267668 |
20-Jun-2014 |
bapt |
use .Mt to mark up email addresses consistently (part2)
PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de>
|
266297 |
17-May-2014 |
dteske |
Update example portion of comment to coincide with r264840 changes.
MFC after: 3 days
|
264840 |
23-Apr-2014 |
dteske |
Implement GEOM based media device classification. You'll notice a few different things from this commit: + More devices. Devices that were previously ignored are now present. + Faster device scanning. "There is no try, only Do" -- f_device_try() is no longer the basis of device scanning as GEOM provides [nearly] all devices (doesn't provide network devices). + More information available as non-root. Usually you have to be root to do things like taste filesystems, and that limits the amount of information available to non-root users; with GEOM, we see all even running unprivileged as the brunt of information (except for so- called ``dangerously dedicated'' file systems) is represented by the `kern.geom.confxml' sysctl(8) MIB. NB: Only really useful for external scripts that use the API and run as non-root; where this code is used in bsdconfig(8) and bsdinstall(8) you are running as root so can detect even ``dangerously dedicated'' file systems that are not present in GEOM; e.g., no PART class for a DOS filesystem written directly to disk without partition table). + No more use of legacy tools such as diskinfo(8) to get disk capacity or fdisk(8) to see partitions.
MFC after: 1 week
|
263150 |
14-Mar-2014 |
dteske |
Rewrite usermgmt -- hooking it into the scripting system with dispatch commands addUser, deleteUser, and editUser. Getting rid of the awkward- to-use `userinput' bolt-on which Ron and I talked about rewriting.
|
263149 |
14-Mar-2014 |
dteske |
Add protection against input containing single-quotes (e.g., i18n-users).
|
263148 |
14-Mar-2014 |
dteske |
For non-interactive scripts, forgot to check we were given an argument before proceeding.
|
263147 |
14-Mar-2014 |
dteske |
Fix a bug preventing errors from pw(8) from filtering up to a dialog. Programs running as rvalue to pipe cannot access current namespace.
|
263146 |
14-Mar-2014 |
dteske |
Reduce the sleep cycle when using dialog(1) to 1-second.
|
263145 |
14-Mar-2014 |
dteske |
Fix comments and whitespace.
|
263144 |
14-Mar-2014 |
dteske |
Fix a code-typo that prevented auto-sizing of the dialog.
|
263141 |
14-Mar-2014 |
dteske |
Point hat! Fix a broken f_isinteger().
|
263139 |
14-Mar-2014 |
dteske |
Remove useless NULL string '' in compound strings. Look very closely.
|
263137 |
14-Mar-2014 |
dteske |
Fix future namespace issues for functions taking $var_to_set -- functions taking a variable to set need to make sure they protect their locals; if $var_to_set positional argument coincides with a local the expected call to `setvar' will fail to reach outside of the function's namespace. When such collisions are experienced (as I did in the rewrite of usermgmt) the solution is to append a full or abbreviated version of the function name to the local (ultimately eliminating collisions). This is rarely needed and only occurs when you have a lot of like-named functions that pass very similar $var_to_set positional arguments to each other (such as-is the case with an expansive library such as `dialog.subr').
|
263136 |
14-Mar-2014 |
dteske |
Update copyright.
|
263135 |
14-Mar-2014 |
dteske |
Comments.
|
263134 |
14-Mar-2014 |
dteske |
Add debug statement just before attempting to exec a module.
|
263133 |
14-Mar-2014 |
dteske |
Remove indexfile from debug statement as it is already logged by f_index_menusel_command() used just-prior to this debug statement. Also, log the arguments being passed to the resword.
|
262984 |
10-Mar-2014 |
dteske |
Remove vestigial global, no-longer used since SVN r262904.
|
262982 |
10-Mar-2014 |
dteske |
Whitespace.
|
262910 |
07-Mar-2014 |
dteske |
Take a group name on the command-line if available.
|
262909 |
07-Mar-2014 |
dteske |
Fix copy/paste error in a comment.
|
262908 |
07-Mar-2014 |
dteske |
Change dipatch words from group* to *Group to backward compatible with ye-olden sysinstall(8).
|
262904 |
07-Mar-2014 |
dteske |
Rewrite groupmgmt -- hooking it into the scripting system with dispatch commands groupAdd, groupDelete, and groupEdit. Getting rid of the awkward- to-use `groupinput' bolt-on which Ron and I talked about rewriting.
|
262902 |
07-Mar-2014 |
dteske |
Comment -- to go with NL global introduced (but not mentioned) by r262901
|
262901 |
07-Mar-2014 |
dteske |
s/__number/__num/ for code clarify but more to prevent localization of __number if passed as the var_to_set argument.
|
262900 |
07-Mar-2014 |
dteske |
Centralize function name. Update a comment while here.
|
262899 |
07-Mar-2014 |
dteske |
Make f_show_err non-fatal.
|
262898 |
07-Mar-2014 |
dteske |
Fix incorrect return status if var_to_set and var_to_get are the same.
|
262897 |
07-Mar-2014 |
dteske |
Fix a typo in a comment.
|
262896 |
07-Mar-2014 |
dteske |
Add missing local declaration.
|
262895 |
07-Mar-2014 |
dteske |
Allow dispatched reswords to carry arguments. Fix a comment while here.
|
260899 |
20-Jan-2014 |
dteske |
Dummy commit (s/__num/__number/) in f_expand_number() to describe that the previous commit here (SVN r260894) was [in-part] from Submitted-by: Christoph Mallon <christoph.mallon@gmx.de>
MFC after: 3 days
|
260894 |
19-Jan-2014 |
dteske |
Optimize f_expand_number(), improving performance.
MFC After: 3 days
|
259427 |
15-Dec-2013 |
gjb |
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.
MFC after: 3 days M-MFC-With: r259426 X-MFC-Before: -RC3 Sponsored by: The FreeBSD Foundation
|
259113 |
09-Dec-2013 |
dteske |
Fix failed attempt to send pkg(8) stderr to /dev/null
MFC after: 3 days
|
259054 |
07-Dec-2013 |
dteske |
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
|
258854 |
02-Dec-2013 |
gjb |
Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since the format of 'pkg -vv' output has changed.
MFC after: 3 days Sponsored by: The FreeBSD Foundation
|
258785 |
30-Nov-2013 |
dteske |
Sort function output on name of the function.
|
258728 |
29-Nov-2013 |
dteske |
Fix an issue where additional lines of a function definition didn't line up with the primary (leading) line of syntax.
|
258727 |
29-Nov-2013 |
dteske |
Fix an issue where the leading `+' sign before a function name was not displayed unless color was requested.
|
258592 |
25-Nov-2013 |
dteske |
Sort messages.
|
258590 |
25-Nov-2013 |
dteske |
Add missing newline to printf format string.
|
258589 |
25-Nov-2013 |
dteske |
Add missing `$' before variable name `pgm'. Unnoticed unless running parallel concurrent copies of `bsdconfig syscons_ttys'.
|
258458 |
22-Nov-2013 |
dteske |
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').
|
258439 |
21-Nov-2013 |
dteske |
f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been documented as such; I just forgot). These utilities are command-line only and as such should stick to either using f_die without arguments or printf)
|
258430 |
21-Nov-2013 |
dteske |
Remove unused line -- cruft left over from SVN r258360.
|
258418 |
21-Nov-2013 |
dteske |
Quote the interface name for good measure.
|
258407 |
20-Nov-2013 |
dteske |
Update function description for API tool: bsdconfig includes -dF f_validate_hostname
|
258406 |
20-Nov-2013 |
dteske |
Make `-d' implicitly enable `-f' for simplification.
|
258401 |
20-Nov-2013 |
dteske |
Add a `-d' flag for printing the description of each function.
|
258400 |
20-Nov-2013 |
dteske |
Add new `includes' module for exploring the bsdconfig(8) API.
|
258360 |
20-Nov-2013 |
dteske |
Whitespace, style, sub-shells, and standardize variable name (s/interfaces/menu_list/).
|
258355 |
19-Nov-2013 |
trhodes |
"Tim trailing" -> "Trim trailing"
|
258267 |
17-Nov-2013 |
dteske |
Fix package installation from physical media such as DVD.
Discussed with: re (gjb) MFC after: 3 days
|
258266 |
17-Nov-2013 |
dteske |
Always shutdown the media when we're exiting the packages module (prevents errors on re-entry for physical media). Also, while we're here, stop ejecting the CDROM when we're done with it (but leave the functions for later use so that we could perhaps -- from the installer standpoint -- use it to eject the media after an install).
MFC after: 3 days
|
258265 |
17-Nov-2013 |
dteske |
Improve debugging with f_eval_catch() introduced by SVN r257784 and also fix a bug where "pkg update" was not getting the value of PACKAGESITE. NB: PACKAGESITE needs to be explicitly exported in support of children.
MFC after: 3 days
|
258264 |
17-Nov-2013 |
dteske |
Kick an unused orphan to the curb ;)
|
258263 |
17-Nov-2013 |
dteske |
Move function name declaration to top of function (where it is closest to the value it needs to be), s/fname/funcname/g, and move function name usage to within printf format string.
MFC after: 3 days
|
258029 |
12-Nov-2013 |
dteske |
Comments.
|
257938 |
11-Nov-2013 |
dteske |
Remove the env(1) but keep the var.
|
257937 |
11-Nov-2013 |
gjb |
Unbreak the installer on head/:
When bsdinstall(8) sources the bsdconfig(8) common.subr file, PKG_ABI is set by calling 'pkg -vv' and searching for the ABI pkg(8) will use.
When pkg(8) is run for the first time, the bootstrap process is run, which prompts for 'y/N' input from stdin if running with TERM set.
Since TERM is set and it is the first time pkg(8) is run, which happens automatically, bsdinstall(8) hangs waiting for user input which is never displayed since a specific line is expected by awk(1), and stdin is expected by pkg(8).
Set ASSUME_ALWAYS_YES=1, which will cause pkg(8) to assume the '-y' flag is also used for the bootstrap process, allowing bsdinstall(8) to proceed to the keymap lookup, otherwise bsdinstall(8) appears to hang after selecting 'Install' from the menu on first boot from CDROM.
|
257819 |
07-Nov-2013 |
dteske |
Use `pkg -vv' to obtain ABI for validating a chosen media server (done prior to diving head-long into a pkg-update(8), et. al). This should also be more future-proof than what was being done just before this.
|
257817 |
07-Nov-2013 |
dteske |
Fix cosmetic typos (since the typo's in the variable names were copied and pasted, it wasn't noticed).
|
257795 |
07-Nov-2013 |
dteske |
Replace pkg-tools with pkgng.
|
257793 |
07-Nov-2013 |
dteske |
Fix an off-by-one error that was causing menus to look funny.
|
257792 |
07-Nov-2013 |
dteske |
Comments.
|
257791 |
07-Nov-2013 |
dteske |
Add f_sprintf() and f_vsprintf() to go along with previously added f_snprintf() and f_vsnprintf() (size-constraint) functions.
|
257790 |
07-Nov-2013 |
dteske |
Fix a bug where a format with leading `-' could be mistaken for printf getopts argument(s).
|
257789 |
07-Nov-2013 |
dteske |
Comments.
|
257788 |
07-Nov-2013 |
dteske |
Add some helpful debugging (showing the resolved host address).
|
257787 |
07-Nov-2013 |
dteske |
Fix a silly bug that would result in attempting to fetch (literally) the URI "httpDirectory" (oops).
|
257785 |
07-Nov-2013 |
dteske |
Use dialog(1) to obtain maximum-size; stty fails when running in a pipe- chain. This allows dialogs to reach full size even when executed as an rvalue operand to a pipe (e.g., cat file | bsdconfig -f-).
|
257784 |
07-Nov-2013 |
dteske |
Add an f_eval_catch() function for debugging individual commands in a series of commands. Accepts the `-d' flag as a first argument to skip displaying messages in a dialog box. The command is logged as it appears to the shell prior to the first pass of parameter expansion to allow copy/pasting into a real shell (opposed to simply echo'ing the command which would produce debug output that has undergone at least one pass of parameter expansion, thus no-longer copacetic for copy/paste). Takes printf(1) style syntax and a utility identifier for error messages.
|
257783 |
07-Nov-2013 |
dteske |
Add an f_show_err() function -- acts pretty much the same as f_show_msg() except it stylizes the msgbox widget to indicate an Error has occurred by setting an appropriate title and default message.
|
257782 |
07-Nov-2013 |
dteske |
Add global DEBUG_INITIALIZE_FILE environment variable for controlling whether the debugFile is truncated upon initialization (useful for when children implicitly re-initialize debugging and you want children to append to your existing debugFile).
|
257781 |
07-Nov-2013 |
dteske |
Comments. Replace a funny syntax with f_isset() while here.
|
257780 |
07-Nov-2013 |
dteske |
Whitespace.
|
257756 |
06-Nov-2013 |
dteske |
Fix a bug that resulted in spurious error message "f_media_shutdown_http: not found" from /usr/libexec/bsdconfig/030.packages/packages.
|
257755 |
06-Nov-2013 |
dteske |
Add support for dereferencing SRV records via f_host_lookup(). Takes the media choice into consideration for determining the appropriate SRV records to query (e.g., _http._tcp, _ftp._tcp, _nfs.tcp, _nfs.udp, etc.).
|
256391 |
12-Oct-2013 |
dteske |
Fix signed integer overflow detection in f_expand_number() of strings.subr.
Approved by: re (glebius)
|
256335 |
11-Oct-2013 |
dteske |
Add new f_expand_number() (shadowing expand_number(3)).
Approved by: re (glebius)
|
256333 |
11-Oct-2013 |
dteske |
Store descriptions for DEVICE_TYPE_DISK and fix static-defaults mapping. Add a default description for bhyve block disk device while we're here.
Approved by: re (glebius)
|
256331 |
11-Oct-2013 |
dteske |
Add $VAR_ZFSINTERACTIVE (zfsInteractive) and new f_zfsinteractive() for determining when a script wants to be nonInteractive but selectively wants ZFS operations to be *interactive* (this is analgous to already existing $VAR_NETINTERACTIVE (netInteractive) and f_netinteractive() used for the same purpose (script wants to be nonInteractive but wants network operations to be *interactive*).
Approved by: re (glebius)
|
256330 |
11-Oct-2013 |
dteske |
Fix a bug that would occur in application death when debugging was enabled if you ended up in f_dialog_*_constrain() (indirectly, of course) with a purposefully-set NULL height, width, or rows parameter (because you didn't care to have that attribute calculated). Fix typo in a comment while here.
Approved by: re (glebius)
|
256325 |
11-Oct-2013 |
dteske |
Add keymap.subr for presenting custom keymap dialogs (with X11 support).
Approved by: re (glebius)
|
256323 |
11-Oct-2013 |
dteske |
Add a USE_DIALOG global (analogous to USE_XDIALOG); useful for inserting text into a prompt or command syntax iff dialog(1) is in-use.
Approved by: re (glebius)
|
256322 |
11-Oct-2013 |
dteske |
Fix a minor bug; if strings.subr was included by itself it may not have access to f_dprintf from common.subr -- fix this by including common.subr.
Approved by: re (glebius)
|
256321 |
11-Oct-2013 |
dteske |
Add support for obtaining the capacity of disks. Add comment while here.
Approved by: re (glebius)
|
256181 |
09-Oct-2013 |
dteske |
Introduce centralized [X]dialog(1) exit codes to `dialog.subr' and make-use 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)
|
255925 |
28-Sep-2013 |
gavin |
Remove ftp5.se.f.o, as per request to -hubs@
Approved by: re (glebius) MFC after: 3 days
|
255908 |
27-Sep-2013 |
brd |
- Remove the is (Iceland) mirror per mail from the admins.
Approved by: re With hat: clusteradm@
|
255818 |
23-Sep-2013 |
dteske |
Fix a bug in HTTP checking/fetching. 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
|
255341 |
07-Sep-2013 |
dteske |
Remove unnecessary mediaClose (FTP operations are done with either ftp(1) or fetch(1), neither of which are stateful, compared to how sysinstall(8) did FTP operations, maintaining an open session until mediaClose).
|
255340 |
07-Sep-2013 |
dteske |
Long URLs don't always appear even with autosizing and other tricks. So, add some whitespace to put the URL on a line by itself, maximizing view.
|
253566 |
23-Jul-2013 |
gavin |
Remove ftp2.tr.freebsd.org, it is out of date.
MFC after: 3 days
|
253545 |
22-Jul-2013 |
dteske |
Sync-up with bsdinstall(8) FTP mirrorselect changes.
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
|
253333 |
14-Jul-2013 |
dteske |
Re-implement $probe_only aspect of f_media_get_TYPE() (where TYPE is cdrom, 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.
|
253175 |
10-Jul-2013 |
dteske |
Introduce a new [yet unused] function for [efficiently] getting the path to 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).
|
253121 |
09-Jul-2013 |
dteske |
Adjust comments to fit within 80-columns.
|
253118 |
09-Jul-2013 |
dteske |
Fix conditional (der should match the comment above it).
MFC after: 1 day
|
253117 |
09-Jul-2013 |
dteske |
Do two things: First, don't obscure the backtitle. Second, read ~/.dialogrc 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
|
252987 |
07-Jul-2013 |
dteske |
Fix typos in the BSD License.
|
252982 |
07-Jul-2013 |
dteske |
Be consistent with other usr.sbin programs w/respect to the copyright wording ("All rights reserved."); I had the casing wrong on many instances.
|
252980 |
07-Jul-2013 |
dteske |
Be consistent with other usr.sbin programs w/respect to the copyright wording ("All rights reserved."); I had the casing wrong on many instances.
|
252853 |
05-Jul-2013 |
dteske |
Don't prevent the user from hanging their system by changing network settings while NFS mounts are active; but DO warn them and make the default action to do nothing. (thanks julian)
|
252849 |
05-Jul-2013 |
dteske |
Check for INDEX file first before anything else when processing modules.
|
252848 |
05-Jul-2013 |
dteske |
Check menuitem before calculating tag.
|
252844 |
05-Jul-2013 |
dteske |
Add the necessary code to reinstall packages. Both scripted access (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).
|
252842 |
05-Jul-2013 |
dteske |
Remove superfluous continue at end of loop. (pointy-hat)
|
252836 |
05-Jul-2013 |
dteske |
Add support for processing add-on modules from /usr/local/libexec/bsdconfig (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.
|
252834 |
05-Jul-2013 |
dteske |
Oops, r252833 was not supposed to touch this file. Back-out and recommit this file with the rest of the files it was supposed to go with.
|
252833 |
05-Jul-2013 |
dteske |
Don't calculate the tag until we know that we're going to make a new menu item entry. Also join simple NULL assignments into a single line.
|
252822 |
05-Jul-2013 |
dteske |
Oops, r252810 forgot to hook the new example file (browse_packages.sh) into the Makefile.
|
252817 |
05-Jul-2013 |
dteske |
Adhere to 80-column width.
|
252816 |
05-Jul-2013 |
dteske |
Document remaining undocumented modules (and remove my silly place-holder thing at the top, which I was using as a way to make sure I didn't forget to document any modules).
|
252815 |
05-Jul-2013 |
dteske |
Make a correction to the description of invocation with-versus-without arguments, making things a bit more clear [hopefully].
|
252813 |
05-Jul-2013 |
dteske |
Document new `-d' and `-D file' debugging options.
|
252811 |
05-Jul-2013 |
dteske |
Change default FTP server (s/ftp-archive/ftp/).
|
252810 |
05-Jul-2013 |
dteske |
Add example shell script for creating a local INDEX file that can be accessed quickly for browsing a list of available packages.
|
252809 |
05-Jul-2013 |
dteske |
Update HISTORY.
|
252808 |
05-Jul-2013 |
dteske |
Rest in peace Ron (Ron McDowell Jul.12, 1955 - Aug.26, 2012). I'll carry-on from here. Thank you so much for your hard work.
|
252807 |
05-Jul-2013 |
dteske |
Update e-mails.
|
252806 |
05-Jul-2013 |
dteske |
Since r251908, bsdconfig(8) has no direct ties to sade(8) (instead uses `bsdinstall partedit'). Update references (s/sade/bsdinstall/) and change the BUGS section to be based on reality.
|
252805 |
05-Jul-2013 |
dteske |
Don't refer to a port manual.
|
252804 |
05-Jul-2013 |
dteske |
mdoc: begin sentences on a new line.
|
252803 |
05-Jul-2013 |
dteske |
Update date on the back of r252802.
|
252802 |
05-Jul-2013 |
dteske |
Fix a typo.
|
252801 |
05-Jul-2013 |
dteske |
Whitespace.
|
252795 |
05-Jul-2013 |
dteske |
Use f_show_msg() instead of f_dialog_msgbox() where appropriate. The main difference between these two functions:
Usage: f_show_msg() $format_string [ $format_args ... ] Usage: f_dialog_msgbox() $text [ $hline ]
The former lends itself well to displaying the $msg_* i18n text, prompts, etc. While the latter is better for text you do not control (error strings captured as a response from external commands) -- or if you have to control the hline.
|
252775 |
05-Jul-2013 |
dteske |
Add the necessary code to uninstall packages (re-install still pending). Both scripted access (packageDelete) and UI access have been tested successfully with a variation of different situations including: + Uninstall a package which no other installed package depends + Uninstall multiple packages which no other installed packages depend + Uninstall multiple packages which depend on each other + Similar to above but when ordered removal requires tracing dependencies + Purposefully do things like uninstall a package that is not installed + Try to uninstall a package which other installed packages still depend + Try to uninstall multiple packages which other installed packages depend + And many more.
|
252774 |
05-Jul-2013 |
dteske |
Add minor debugging.
|
252773 |
05-Jul-2013 |
dteske |
Prevent f_package_add() from re-performing f_package_detect_installed() even though f_package_config() may have already detected the installed packages.
|
252772 |
05-Jul-2013 |
dteske |
Don't deselect a package right after installing it (this went unnoticed because [currently] we exit after performing requests actions -- if we ever change this to returning to the package selection screen, this would have made an impact).
|
252771 |
05-Jul-2013 |
dteske |
Minor debugging changes/additions.
|
252753 |
05-Jul-2013 |
dteske |
Fix a typo in a comment.
|
252746 |
05-Jul-2013 |
dteske |
Add the beginnings of the old networking services functionality of sysinstall(8). The UI for this will come later while this exposes the functionality to the scripted interface. Tested successfully to first install the pcnfsd package from the `Latest' repository, and second to configure mountd_flags="-n" in rc.conf(5).
|
252745 |
05-Jul-2013 |
dteske |
Add the necessary code to install packages (uninstall and re-install still pending). Both scripted access (packageAdd) and UI access have been tested successfully with a variation of different situations including: + Install a package with no dependencies + Install a package with dependencies that are already installed + Install a package with dependencies where some are already installed + Repeat each of the above from FTP and local Directory + Purposefully do things like try to install a package that does not exist + Try to install a package for which a dependency could not be loaded + Try to install a package that is in the INDEX bot not on the media + And many more.
|
252744 |
05-Jul-2013 |
dteske |
Add debugging for each of the initialized default variables.
|
252743 |
05-Jul-2013 |
dteske |
Add mustberoot.subr to the list of includes for scripts, exposing the helper function f_mustberoot_init() to make it easy to write scripts that can more easily transition to the super-user via sudo(8).
|
252742 |
05-Jul-2013 |
dteske |
Remove separate processing of dependent packages from the "Review" screen since f_package_add (packageAdd resword) processes dependencies itself. NOTE: This is in preparation for incoming package management code.
|
252741 |
05-Jul-2013 |
dteske |
Get rid of place-holder in preparation for incoming package mgmt code.
|
252740 |
05-Jul-2013 |
dteske |
Comments.
|
252738 |
05-Jul-2013 |
dteske |
Allow global default as general fall-back for package management routines.
|
252737 |
05-Jul-2013 |
dteske |
Set name of device to directory path (displayed during package operations).
|
252721 |
04-Jul-2013 |
dteske |
Implement $probe_only for the media access modules. sysinstall(8) was allowed to ignore the probe_only argument of its member functions solely because in the C language, the file accessor methods open and return a file descriptor and reading of the data is optional. In shell, the file accessor methods return data on stdout and that data should not be ignored (large files could block execution).
So, we must adhere to the probe_only flags and in some cases (in the case of FTP, for example) change the `get' strategy to simply test existence and return an appropriate status.
This was required because the up-coming package management stuff makes heavy use of the probe_only argument to try different package suffixes. Every media access module must implement $probe_only for the `get' accessor.
|
252178 |
24-Jun-2013 |
dteske |
More whitespace.
|
252177 |
24-Jun-2013 |
dteske |
Whitespace.
|
252113 |
23-Jun-2013 |
dteske |
Add a newline character to the end of the "Check URL again" error message because long URLs do not induce extra height despite wrapping by dialog(1). NOTE: For even longer lines, the cursor up/down keys work to scroll through
|
252112 |
23-Jun-2013 |
dteske |
Merge r248313 from stable/9 sysinstall(8) to head bsdconfig(8): Add support for installation directly via HTTP.
While we're here, remove the menu-item for Passive FTP (since moving to ftp(1) and switching FTPMODE to `auto' by default -- see r251613 -- the single remaining FTP menu-item works for both ftp.f.o and ftp-archive.f.o; previously each requiring separately active versus passive both work with the `auto' setting). In scripting you still have mediaSetFTPActive and mediaSetFTPPassive but the remaining FTP menu-item uses mediaSetFTP which defaults to `auto' (aforementioned SVN r251613).
|
252110 |
23-Jun-2013 |
dteske |
Implement the $probe_only parameter (previously unimplemented).
|
252109 |
23-Jun-2013 |
dteske |
Fine-tune the parsing of the URL. Re-order, comment, and add debugging to each case of unique URL format.
|
252086 |
22-Jun-2013 |
dteske |
Fix a code typo that prevented the probing of the current defaultrouter in-order to pre-populate the editor.
|
252085 |
22-Jun-2013 |
dteske |
Oops, previous revision (r252084) broke non-full-path resolution (e.g., ftp://ftp.freebsd.org or ftp://ftp.freebsd.org/). Now both full-path and non-full resolution is working regardless of trailing-slash.
|
252084 |
22-Jun-2013 |
dteske |
Trim the trailing `/' from the ftp_dir when validating that the directory exists on the FTP server. This now means that when you specify a full-path to the repository on the FTP server that it doesn't matter whether you have a trailing `/' or not.
|
252083 |
22-Jun-2013 |
dteske |
Take advantage of the fact that f_getvar evaluates the $var_to_get parameter within braces, allowing all manner of parameter expansions (properly quoted or escaped, of course).
|
252082 |
22-Jun-2013 |
dteske |
Fix a regression introduced by r251967, resulting in:
/usr/libexec/bsdconfig/110.mouse/mouse: 134: Syntax error: ";;" unexpected (expecting "fi")
|
252081 |
22-Jun-2013 |
dteske |
Fix a regression introduced by r251967, resulting in:
/usr/libexec/bsdconfig/080.console/console: 136: Syntax error: ";;" unexpected (expecting "fi")
|
252079 |
21-Jun-2013 |
dteske |
Add missing local declaration.
|
252078 |
21-Jun-2013 |
dteske |
Remove unused library include.
|
252077 |
21-Jun-2013 |
dteske |
Alphabetize library includes.
|
252076 |
21-Jun-2013 |
dteske |
Style.
|
252075 |
21-Jun-2013 |
dteske |
Typo and grammar fixes to comments.
|
252022 |
20-Jun-2013 |
dteske |
Fix a code typo in a case-statement match expression that prevented IPv6 URLs with port designator from working properly (e.g. http://[::1]:80/).
|
252020 |
20-Jun-2013 |
dteske |
When the fall-back of a case-statement is the last thing executed in a while-loop _and_ all prior matches in the same case-statement either break or continue, we can safely break the fall-back out of the case-statement. This should improve readability and allow for longer-lines by reducing the level of indentation by-one for the fall-back case. (a continuation of SVN r252019)
|
252019 |
20-Jun-2013 |
dteske |
When the fall-back of a case-statement is the last thing executed in a while-loop _and_ all prior matches in the same case-statement either break or continue, we can safely break the fall-back out of the case-statement. This should improve readability and allow for longer-lines by reducing the level of indentation by-one for the fall-back case.
|
252018 |
20-Jun-2013 |
dteske |
Remove pedanticism and consolidate some logic.
|
252017 |
20-Jun-2013 |
dteske |
Add debugging (for a case that shouldn't arise, but makes it more obvious if a menu addition is made in one plce but forgotten in another).
|
252002 |
19-Jun-2013 |
dteske |
Style -- no ;; needed on fallback clause within case-statement.
|
252001 |
19-Jun-2013 |
dteske |
Whitespace.
|
252000 |
19-Jun-2013 |
dteske |
Whitespace and comments.
|
251997 |
19-Jun-2013 |
dteske |
Alphabetize reserved-word (resword) registration.
|
251996 |
19-Jun-2013 |
dteske |
Alphabetize includes.
|
251981 |
19-Jun-2013 |
dteske |
Remove extra whitespace lines.
|
251980 |
19-Jun-2013 |
dteske |
Change a humongous if-statement at the end of f_install_zoneinfo_file() into an early return, allowing a huge chunk of code to be indented one-level less
|
251979 |
19-Jun-2013 |
dteske |
Take advantage of newly updated f_dialog_{yesno,noyes}() functions from SVN r251977 (adding an $hline parameter).
|
251978 |
19-Jun-2013 |
dteske |
When I first wrote the timezone module, it was in sysutils/tzdialog and it pre-dates bsdconfig. Update the code to take advantage of f_dialog_msgbox().
|
251977 |
18-Jun-2013 |
dteske |
Change the f_dialog_{yesno,noyes}() function-arguments in `dialog.subr' to accomodate an $hline value for overriding the default. This change does not effect any current modules as it turns out that not one single usage of either f_dialog_yesno() or f_dialog_noyes() relied on accepting more than a first argument (read: all occurrences quoted the first parameter; so $* was never depended upon).
This will allow some custom invocations of --yesno and --noyes to roll over to these functions (for example, in `timezone/timezone').
|
251975 |
18-Jun-2013 |
dteske |
Perform some code consolidation and replace nested case-statements with more logical if-else statements for each menu selection.
|
251974 |
18-Jun-2013 |
dteske |
Fix a regression introduced by r251967, resulting in:
/usr/libexec/bsdconfig/140.startup/startup: 130: Syntax error: ";;" unexpected (expecting "fi")
|
251972 |
18-Jun-2013 |
dteske |
Whitespace.
|
251967 |
18-Jun-2013 |
dteske |
Perform some code consolidation and add some additional error checking/reporting. (similar to SVN revisions 251919 and 251928)
|
251965 |
18-Jun-2013 |
dteske |
Comments.
|
251933 |
18-Jun-2013 |
dteske |
Comments and whitespace.
|
251930 |
18-Jun-2013 |
dteske |
Comments.
|
251928 |
18-Jun-2013 |
dteske |
Perform some code consolidation and add some additional error checking/reporting. (similar to SVN revision 251919)
|
251926 |
18-Jun-2013 |
dteske |
Whitespace and comments.
|
251919 |
18-Jun-2013 |
dteske |
Perform some code consolidation and add some additional error checking/reporting. (similar to SVN revisions 251905 and 251915)
|
251915 |
18-Jun-2013 |
dteske |
Remove unnecessary loops, perform some code consolidation, and add some additional error checking/reporting. (same thing going on here as SVN r251905 -- just this time for the mouse module instead of console)
|
251914 |
18-Jun-2013 |
dteske |
Whitespace.
|
251913 |
18-Jun-2013 |
dteske |
Use newly enhanced f_dialog_msgbox() from SVN r251912.
|
251912 |
18-Jun-2013 |
dteske |
Change the f_dialog_msgbox() arguments in `dialog.subr' to accomodate an $hline argument for setting the --hline parameter value. This change does not effect any current modules as it turns out that not one single usage of f_dialog_msgbox() relied on accepting more than a first argument (read: all occurrences quoted the first parameter; so $* was never depended upon).
This will allow some custom invocations of --msgbox to roll over to this function (for example, in `mouse/disable').
|
251911 |
18-Jun-2013 |
dteske |
Comments.
|
251910 |
18-Jun-2013 |
dteske |
Comments.
|
251909 |
18-Jun-2013 |
dteske |
Fix a typo in a comment.
|
251908 |
18-Jun-2013 |
dteske |
Switch bsdconfig `Disk Management' from sade(8) to `bsdinstall partedit'.
|
251907 |
18-Jun-2013 |
dteske |
Oops, in SVN r251905 I forgot that f_die takes the return code as the first argument (not the format).
|
251906 |
18-Jun-2013 |
dteske |
Improve the INDEX format. Whitespace improvements, format improvements, typo and grammatical fixes.
|
251905 |
18-Jun-2013 |
dteske |
Remove unnecessary loops, perform some code consolidation, and add some additional error checking/reporting.
|
251904 |
18-Jun-2013 |
dteske |
Whitespace improvements.
|
251793 |
15-Jun-2013 |
dteske |
Style/comments.
|
251758 |
14-Jun-2013 |
dteske |
Add skeleton processing of selected packages in the order in which they should be processed. De-select each package as we "process" (actual processing still pending) each package so that if we get an error, we can return to an accurate state of selected packages.
|
251613 |
11-Jun-2013 |
dteske |
Make the default choice for FTP media access use "auto".
|
251579 |
09-Jun-2013 |
dteske |
Fix a bug introduced by r251236; product of bug was the following error in "Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":
[: -eq: unexpected operator
NOTE: Previously mentioned in r251557
Problem caused by removal of $retval to capture exit status of call to f_dialog_input_rclist().
While we're here, enhance f_dialog_input_rclist() to accept a default-item to make selecting multiple values to-add more efficient.
|
251557 |
08-Jun-2013 |
dteske |
Fix a bug introduced with r251190, in which a small hunk was forgotten in the performance conversion process.
The effect of this was the following error when selecting the menu "Startup"->"View/Edit Startup Configuration"->"Add New"->"Add From List":
[: -eq: unexpected operator
By running `bsdconfig -d' as root to enable debugging, this turns into:
DEBUG: f_getvar: var=[text] value=[ Error: Expected a number for token 4 of --menu. Use --help to list options.] r=0 [: -eq: unexpected operator
Indicating that the fourth token for --menu which should be $height was instead a string (the first item of $menu_list) because it was using the old size-calculation method and $size was now null (needed to use instead the new size variables of $height $width and $rows).
|
251556 |
08-Jun-2013 |
dteske |
Fix a bug introduced with r249751, in which a small hunk was forgotten in the performance conversion process.
The effect of this was, when your /etc/defaults/rc.conf file changed (based on md5(1)) and re-generating the file startup_rcconf_map.cache in /var/run/bsdconfig/ you would get a screen-dump of its contents before the menu would appear.
|
251555 |
08-Jun-2013 |
dteske |
Fix a typo in comments.
|
251554 |
08-Jun-2013 |
dteske |
Don't silently ignore errors (found while testing with `chflags schg /etc/ttys).
|
251553 |
08-Jun-2013 |
dteske |
Prevent getting hung-up on the following prompt (found while testing with `chflags schg /etc/ttys'):
override rw-r--r-- root/wheel for /etc/ttys? (y/n [n])
Simply by adding `-f' flag to mv(1).
|
251552 |
08-Jun-2013 |
dteske |
Fix a one-character typo. The effects of which were "Console"->"Ttys" menu would not launch (and gave no error). This was easily diagnosed by running `bsdconfig -d' as root and seeing the following error right after selecting the "Ttys" sub-menu:
DEBUG: f_getvar: var=[text] value=[ Error: Expected at least 6 tokens for --menu, have 4. Use --help to list options.] r=0
Typo was introduced by SVN r251361.
|
251549 |
08-Jun-2013 |
dteske |
Add a prompt to the "Add User" and "Add Group" sub-menu items (under the "Login Management" module): Use default values for all account details?
If you select "Yes" (the default is "No"), you'll jump past all the prompts and jump straight to the review screen with all-default values.
Makes adding a lot of users/groups faster/easier if you don't need to customize more than one or two different values from their defaults.
|
251547 |
08-Jun-2013 |
dteske |
Curb another regression (this one introduced by r251545, itself trying to fix the regression introduced by r251544; which was trying to make things consistent w/respect to ESC versus YES versus NO in the password disable prompt in "Login Management".
(need stronger coffee; very sorry for the churn)
With this revision, the "YES", "NO", and implied ESC options all work as- expected. Choosing "YES" allows you to proceed and the password will be disabled. Choosing "NO" will bring back around to enter a password for the account. Pressing ESC will drop you out of either user or group input and back to the usermgmt screen.
|
251545 |
08-Jun-2013 |
dteske |
Fix a regression introduced by r251544; if user chooses "NO" when being asked if they would like to disable password authentication for the account, loop back to prompt them for the password again.
|
251544 |
08-Jun-2013 |
dteske |
Check for ESC as a separate choice from "NO" when asking if the operator would like to disable password management for an account while adding either a user or group. When being prompted to answer questions while adding a group or user, two things are trow:
1. You can hit ENTER to blast through all the questions and in the end, the group or user is created with sensible defaults for all values.
2. You can press ESC during any prompt to cancel the operation as a whole.
This fix is shoring up an inconsistency in the latter (#2).
|
251543 |
08-Jun-2013 |
dteske |
Track defaultitem in the password and account expiry menus; if the user presses ESC or chooses Cancel/No in any of the sub-menus, we want to return to the expiry menu with that item selected.
|
251542 |
08-Jun-2013 |
dteske |
Fix a regression in the "Login Management" module introduced by r251242 in which choosing to cancel the manual input of expiration time (in seconds since the UNIX epoch) for either account expiration or password expiration would see the original value lost.
|
251541 |
08-Jun-2013 |
dteske |
Reduce verbosity in the "Console"->"Saver" module (bsdconfig syscons_saver) by replacing the infinitive [verb] phrase "Simply blank the screen" with a simple description of what you get; "Blank screen".
PR: ports/169316
|
251540 |
08-Jun-2013 |
dteske |
Remove extraneous characters ('<<<') from `Exit' menutag in the "Security" and "Startup"->"Misc" modules to make the menus appear more consistent with the numerous other modules and look a little cleaner.
PR: ports/169316
|
251390 |
04-Jun-2013 |
dteske |
Shift Console->Saver menu items to place the default item at the top, making this menu consistent with Console->Repeat, Console->Font, Console->Screenmap and many others which place the default choice at the top.
NOTE: SVN r249751 changed things so that these menus highlight the active selection, so the idea that the default choice (now at top) "can be selected immediately by hitting ENTER" is not possible unless the default choice is the currently active setting (e.g., on first visit to the menu). However, it is still warranted to have the default choice at the top of the menu.
PR: bin/169316
|
251389 |
04-Jun-2013 |
dteske |
Lessen verbosity of "Exit" menutag items to appear more consistent across menus from one module to the next.
Replacing "Exit this menu (returning to previous)" with "Exit this menu".
PR: ports/169316
|
251364 |
04-Jun-2013 |
dteske |
Use f_shell_escape() instead of forking to awk. In this case, the replacement comes with a great performance increase (as f_shell_escape() uses the built-in based f_replaceall() which out-performs forking to awk(1)). This should also improve readability slightly.
|
251363 |
04-Jun-2013 |
dteske |
Use a case-statement instead of multiple (separate even) if-statements.
|
251362 |
04-Jun-2013 |
dteske |
Comments.
|
251361 |
04-Jun-2013 |
dteske |
Similar to r251236, r251242, and r251244. Introduce new function-pair to dialog(1) API in dialog.subr responsible for retrieving menu-choice data (for the --menu widget).
Add f_dialog_menuitem_store()/f_dialog_menuitem_fetch() for storing and retrieving the menuitem (not the tag) from a --menu widget result.
The dialog --menu widget returns the `tag' from the tag/item pair of choices for a menu list. Because the menu list is often local to the function that is displaying it, the ability to dereference this into the item is not possible unless you use a global. This changes things so the function (upon successful return of dialog) dereferences the tag into the item and stores it for later retrieval using these functions.
NOTE: Tags are dereferenced into items using f_dialog_menutag2item().
|
251357 |
04-Jun-2013 |
dteske |
Fix a code typo (missing `eval') which lead to improperly-sized menu when displaying packages (menu was always maximum height). The problem was introduced by SVN r251232.
|
251355 |
04-Jun-2013 |
dteske |
Fix menu accenting for the package category list. The single-space indent for duplicate initial-characters was removed for making comparisons but was not put back.
|
251354 |
04-Jun-2013 |
dteske |
Whitespace and comments.
|
251353 |
04-Jun-2013 |
dteske |
Improve debugging for f_dialog_*_constrain() to print constrained rather than unconstrained values.
|
251278 |
02-Jun-2013 |
dteske |
Like r250701, introduce another handy function for truncating variables to a specific byte-length. Works like vsnprintf(3).
|
251277 |
02-Jun-2013 |
dteske |
Fix a typo. In this case, the typo caused the f_noyes() invocation to display a global instead of the passed-argument; however since the global always has the same value as the passed argument, it made no difference in the realtime operation.
|
251276 |
02-Jun-2013 |
dteske |
Fix a bug in which the user's choice to Cancel was not recognized. This was caused by the standard (and correct) behavior of the shell to discard the return status of lvalue-operands in a pipe-chain.
The solution is to not pipe the file-acquisition directly into sort(1) but instead store the output (allowing immediate testing of the return status) and later sort it.
|
251275 |
02-Jun-2013 |
dteske |
Fix a bug that would cause a spurious warning to appear to appear in an edge-case. The case was that you have been through the FTP setup once before and on the second time through, you cancel at the re-selection of a new FTP server.
The spurious warning was "device_media: not found" and was caused because the underlying call to f_device_network_down() did not check to see if the network device existed before attempting to shut it down.
Add checks to make sure we don't forge ahead unless the device exists.
|
251274 |
02-Jun-2013 |
dteske |
Fix a bug in which the user's choice to Cancel was not properly recognized.
|
251273 |
02-Jun-2013 |
dteske |
Change the name of a couple of functions in `usermgmt/user_input.subr' to make their purpose more clear by their names:
f_dialog_input_change() and f_dialog_input_expire()
Are now (respectively):
f_dialog_input_expire_password() and f_dialog_input_expire_account()
Upon revisit to this portion of code, the former names were too confusing.
|
251272 |
02-Jun-2013 |
dteske |
Fix a copy/paste error within a comment.
|
251271 |
02-Jun-2013 |
dteske |
Add some additional debugging to the common media library.
|
251270 |
02-Jun-2013 |
dteske |
Make some obvious consolidations in local declaration for readability.
|
251269 |
02-Jun-2013 |
dteske |
Standardize NULL initialization to be consistent.
|
251268 |
02-Jun-2013 |
dteske |
Use f_isset() (introduced by r250317) instead of `f_quietly f_getvar ...'.
|
251267 |
02-Jun-2013 |
dteske |
Make proper use of locals in f_dialog_init().
|
251266 |
02-Jun-2013 |
dteske |
Improvements to whitespace and comments.
|
251265 |
02-Jun-2013 |
dteske |
Fix option processing from the library layer to address unexpected behavior(s); e.g., `-Xd' versus `-dX' did not produce the same results.
The libraries common.subr and dialog.subr automatically process the arguments passed to the program and enable/disable functionality without the need to process the arguments within your program. For example, if "$@" contains `-d', common.subr will see this and enable debugging regardless of whether you process "$@" yourself or not (this automatic processing can easily be disabled for custom scripts that don't want it; see the afore- mentioned scripts for additional details).
NOTE: common.subr stores a copy of "$@" in $ARGV for convenient (and repeated) processing by libraries such as dialog.subr which provide such transparent functionality for the consuming script(s).
However, the libraries don't know if a program wants to accept `extra' options. Flags are not really a problem, because the library can be programmed to silently ignore unknown flags. The trouble comes into play when the program wants to define an option that takes an argument.
For example:
bsdconfig -D logfile -X
In the above example, the library uses getopts to process $ARGV and if it doesn't know that `-D' takes an argument, the option processing will prematurely terminate on `logfile' (this is standard/correct behavior for getopts but is undesired in our situation where we have partially off-loaded main argument processing).
The problem is solved by allowing the program to define an extra set of options to be included in each library's handling of $ARGV. Only options that require arguments are truly necessary to be pre-specified in this new manner.
|
251264 |
02-Jun-2013 |
dteske |
Standardize the way functions build their arguments leading up to a dialog invocation. Specifically, "top-load" your arguments and in the order in- which they will be displayed. For example, many [if not all] widgets display information in the following order, top-to-bottom (visually):
+ backtitle (displayed behind the widget at top-left) + title (at the top of the `window') + prompt text (just below the title and above whatever widget you choose) + Depending on widget, _one_ of the following: - menu list - radio list - check list - text input box with initial text - [Xdialog(1)] 2x or 3x text input boxes - [dialog(1)] a multi-part form - progress bar - etc. (many more widget choices) + buttons (right below the selected widget) + [dialog(1)] the hline (displayed at bottom of `window')
NOTE: Xdialog(1) accepts and silently ignores --hline
When building local arguments for your dialog invocation, if the value can't be cleanly loaded into a local, add "# Calculated below" to the end of the local declaration while retaining the block order of argument declarations.
Move other local declarations that are not associated with this top-loading the dialog arguments to right-above where they are first-used.
Also, standardize on the names of the arguments. For example, always use $prompt (instead of sometimes $msg and sometimes $prompt); use $menu_list or $shell_list or $radio_list for those respective widgets; ad nauseum.
While we're doing this, flush-out full arguments for many invocations that were passing NULL strings (making it unapparent if you were staring at this one invocation what argument that NULL string was supposed to represent).
Last, while we're in startup/rcconf let's remove the unnecessary use of a GLOBAL (RCCONF_MENU_LIST) for the menu_list.
|
251244 |
02-Jun-2013 |
dteske |
Improve the dialog(1) API in dialog.subr by adding f_dialog_default_store() and f_dialog_default_fetch(). Operating similar to functions introduced by SVN r251236 and r251242, these functions operate as a pair for helping track the default-item data (for the --menu, --checklist, and --radiolist widgets).
This replaces the direct usage of a global to store the data with an abstract method for readability and to centralize the code.
|
251242 |
02-Jun-2013 |
dteske |
Similar to r251236, improve the portion of dialog(1) API in dialog.subr responsible for retrieving stored input (for the --inputbox and --password widgets).
When we (Ron McDowell and I) developed the first version of bsdconfig, it used temporary files to store responses from dialog(1). That hasn't been true for a very long time, so the need to always execute some clean-up function is long-deprecated. The function that used to perform these clean- up routines for these widgets was f_dialog_inputstr().
We really don't need f_dialog_inputstr() for its originally designed purpose as all dialog invocations no longer require temporary files.
Just as in r251236, redesign f_dialog_inputstr() in the following four ways:
1. Rename f_dialog_inputstr() to f_dialog_inputstr_fetch() 2. Introduce the new first-argument of $var_to_set to reduce forking 3. Create a corresponding f_dialog_inputstr_store() to abstract storage 4. Offload the sanitization to a new function, f_dialog_line_sanitize()
It should be noted that f_dialog_line_sanitize() -- unlike its cousin from SVN r251236, f_dialog_data_sanitize() -- trims leading/trailing whitespace from the user's input. This helps prevent errors and common mistakes caused by the fact that the new cdialog implementation allows the right-arrow cursor key to go beyond the last byte of realtime input (adding whitespace at the end of the typed value).
While we're centralizing the sanitization, let's rewrite f_dialog_input() while we're here to likewise reduce forking. The f_dialog_input() function now expects the first argument of $var_to_set instead of producing results on standard-out.
These changes greatly improve readability and also improve performance.
|
251236 |
01-Jun-2013 |
dteske |
Improve portion of the dialog(1) API in dialog.subr responsible for retrieving stored data (for the --menu, --calendar, --timebox, --checklist, and --radiolist widgets).
When we (Ron McDowell and I) developed the first version of bsdconfig, it used temporary files to store responses from dialog(1). That hasn't been true for some very long time, so the need to always store the return status of dialog(1) and then call some function to clean-up is long-deprecated. The function that used to do the clean-up was f_dialog_menutag().
We really don't need f_dialog_menutag() for its originally designed purpose, as all dialog invocations (even when in a sub-shell) do not use temporary files anymore.
However, we do need to keep f_dialog_menutag() around because it still fills the need of being able to abstract the procedure for fetching stored data provided by functions that display the aforementioned widgets.
In re-designing f_dialog_menutag(), four important changes are made:
1. Rename f_dialog_menutag() to f_dialog_menutag_fetch() 2. Introduce the new first-argument of $var_to_set to reduce number of forks 3. Create a corresponding f_dialog_menutag_store() to abstract the storage 4. Offload the sanitization to a new function, f_dialog_data_sanitize()
NOTE: That last one is important. Not all functions need to store their data for later fetching, meanwhile every invocation of dialog should be sanitized (as we learned early-on in the i18n-effort -- underlying libraries will spit warnings to stderr for bad values of $LANG and since dialog outputs its responses to stderr, we need to sanitize every response of these warnings).
These changes greatly improve readbaility and also improve performance by reducing unnecessary forking.
|
251233 |
01-Jun-2013 |
dteske |
Fix a typo introduced by r251190.
|
251232 |
01-Jun-2013 |
dteske |
Fix a regression in the packages module introduced by recent r251190. I somehow neglected this module in merging that API change.
|
251190 |
31-May-2013 |
dteske |
Improve portion of the dialog(1) API in dialog.subr responsible for calculating widget sizes. Instead of forking a sub-shell to calculate the optimum size for a widget, use a byRef style call-out to set variables in the parent namespace. For example, instead of:
size=$( f_dialog_buttonbox_size title btitle msg ) $DIALOG --title title --backtitle btitle --msgbox msg $size
The new API replaces the above with the following:
f_dialog_buttonbox_size height width title btitle msg $DIALOG --title title --backtitle btitle --msgbox msg $height $width
This reduces the number of forks, improves performance, and makes the code more readable by revealing the argument-order for widget sizing. It also makes performing minor adjustments to the calculated values easier as you no longer have to split-out the response (which required knowledge of ordering so was counter-intuitive).
|
250702 |
16-May-2013 |
dteske |
Fix a typo in a comment.
|
250701 |
16-May-2013 |
dteske |
Add a handy function for truncating variables to a specific byte-length. It should be noted that newlines are both preserved and included in said byte- count. If you want to truncate single-line values without regard to line termination, there's always f_substr() which already exists herein.
|
250633 |
14-May-2013 |
dteske |
Centralize standard getopts arguments, both for convenience and to correct a bug in which certain combinations of arguments produced unexpected results such as `-dX' (now properly produces debugging and X11), `-XS' (now properly produces X11 in secure mode), `-df-' (enables debugging when reading a script from standard-input, etc. Multi-word variations such as `-d -X', `-X -S', `-d -f-', `-d -f -', etc. also work as expected. Also tested were variations in argument order, which are now working as expected.
|
250539 |
12-May-2013 |
dteske |
Comment.
|
250538 |
12-May-2013 |
dteske |
Fix i18n violations in the package management module. A few words like `packages', `installed', and `selected' were not internationalized.
|
250537 |
12-May-2013 |
dteske |
Remove duplicated string.
|
250536 |
12-May-2013 |
dteske |
Comments.
|
250535 |
12-May-2013 |
dteske |
Whitespace.
|
250410 |
09-May-2013 |
dteske |
Fix a bug that would cause the category menu to display the wrong value for number of packages available in the "All" category. Problem caused by re-using a variable that was still needed; fixed by variable name change.
|
250323 |
07-May-2013 |
dteske |
Commit first portion of package module -- this includes the ability to view categories, view packages, mark packages for installation, de-installation, or re-installation, calculate and track dependencies, as well as ability to review selections.
Still to come is the actual processing of selections (performing the various actions associated with the user's selections, such as installing dependencies first, then selections, etc.).
|
250322 |
07-May-2013 |
dteske |
Explicitly track "script.subr" which wasn't showing up in the graph because it's not used by anything within bsdconfig nor any modules (rather, the script.subr include is designed to be used externally -- nonetheless we want to track it in the modular graph outputs showing includes).
|
250321 |
07-May-2013 |
dteske |
Recursively calculate includes. This solves the problem of some includes missing from the graph, but it also unfortunately forces yet another bug in graphviz dot(1) to appear. When edge labels are enabled (using '\T') with this many edges, dot(1) will do bad things in init_rank() and often crash. So while we're here, let's disable edge labels for the include- relationship graph feature.
|
250320 |
07-May-2013 |
dteske |
Remove unused variables.
|
250319 |
07-May-2013 |
dteske |
Alphabetize strings by variable names.
|
250318 |
07-May-2013 |
dteske |
Re-organize and add missing installVarDefaults and mediaSetDirectory.
|
250317 |
07-May-2013 |
dteske |
Add f_isset() utility subroutine for checking if a variable is set but in a more readable fashion.
|
249955 |
26-Apr-2013 |
dteske |
Properly sanitize --menu results (guards against Gtk library warnings from X11 side of things from bleeding into Xdialog(1) stderr output). It should be duely noted that such errors are not a by-product of anything in the Xdialog(1) utility or API, but optional libraries that it can link against (such as Gtk1 versus Gtk2; if you compile xdialog from ports against Gtk2 AND misconfigure your fonts or generally make Gtk2 unhappy, these warning messages can bleed into the captured stderr -- that is we we sanitize!).
|
249954 |
26-Apr-2013 |
dteske |
Comments.
|
249827 |
24-Apr-2013 |
dteske |
Fix copy/paste error.
|
249823 |
23-Apr-2013 |
dteske |
Add missing include.
|
249783 |
23-Apr-2013 |
dteske |
Prevent device.subr from auto-loading in the nameservers module. This module doesn't need device support (but device.subr is loaded indirectly through media/tcpip.subr which contains resolv stuff).
|
249781 |
22-Apr-2013 |
dteske |
Preserve debugFile preference across the exec boundary.
|
249780 |
22-Apr-2013 |
dteske |
Partially uncommit r249779. The changes to share/common.subr were good while the remaining changes were part of a much larger ``secret sauce'' involved in an up-coming commit that I'm still laboring on.
|
249779 |
22-Apr-2013 |
dteske |
Fix "-D file" to automagically enable debugging if not explicitly disabled.
|
249759 |
22-Apr-2013 |
dteske |
Clarify to the user the amount of time required to load the menus for each view in the details dialog.
|
249758 |
22-Apr-2013 |
dteske |
New helper functions for common widgets.
|
249757 |
22-Apr-2013 |
dteske |
Proper fix for copy/paste error (first attempt r249756).
|
249756 |
22-Apr-2013 |
dteske |
Fix a copy/paste error.
|
249755 |
22-Apr-2013 |
dteske |
Update comment for accuracy.
|
249754 |
22-Apr-2013 |
dteske |
Style nit (to be consistent across project).
|
249753 |
22-Apr-2013 |
dteske |
Fix two bugs when setting up a plip interface. First, dhcp status was not being properly cleared each iteration of the loop. Second, values weren't properly quoted when sent to the editor function.
|
249751 |
22-Apr-2013 |
dteske |
UI improvements. First, implement --default-item whenever and wherever possible to save keystrokes. Second, overhaul startup/rcdelete for much improved performance. Last, but not least, kill-off useage of --clear and implement --keep-tite in harmony to minimize jarring transitions. Also, fix local variable names where necessary while we're here with other minor comment-enhancements/typo-corrections.
|
249749 |
22-Apr-2013 |
dteske |
Use new f_getvar for clarity and general code follow-up to r249746.
|
249746 |
22-Apr-2013 |
dteske |
Add new flags `-d' (sets debug=1) and `-D file' (sets debugFile) and improve debugging initialization. Also fixup USAGE statements while we're here. Also, change initialization of main program to _not_ change working directory, allowing the debugFile to be relative without confusion.
|
249094 |
04-Apr-2013 |
mav |
Remove some more references to legacy ATA.
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
|
247280 |
25-Feb-2013 |
dteske |
Import media selection/preparation framework (sysinstall inspired). Makes accessing files from various types of media nice and abstracted away from the wet-work involved in preparing, validating, and initializing those types of media. This will be used for the package management system module and other modules that need access to files and want to allow the user to decide where those files come from (either in a scripted fashion, prompted fashion, or any combination thereof).
Heavily inspired by sysinstall and even uses the same reserved words so that scripts are portable. Coded over months, tested continuously through- out, and reviewed several times.
Some notes about the changes: - Move network-setting acquisition/validation routines to media/tcpip.subr - The options screen from sysinstall has been converted to a dialog menu - The "UFS" media choice is renamed to "Directory" to reflect how sysinstall treats the choice and a new [true] "UFS" media choice has been added that acts on real UFS partitions (such as external disks with disklabels). - Many more help files have been resurrected from sysinstall (I noticed that some of the content seems a bit dated; I gave them a once-over but they could really use an update). - A total of 10 media choices are presented (via mediaGetType) including: CD/DVD, FTP, FTP Passive, HTTP Proxy, Directory, NFS, DOS, UFS, Floppy, USB - Novel struct/device management layer for managing the issue of passing more information than can comfortably fit in an argument list.
|
247278 |
25-Feb-2013 |
dteske |
Fix typo and update copyright.
|
246546 |
08-Feb-2013 |
dteske |
Remove NO_OBJ from Makefiles that generate manuals because this causes the GZIP compressed manuals to appear in ./src instead of the appropriate obj dir.
PR: conf/175844 Submitted by: Dominique Goncalves <dominique.goncalves@gmail.com>
|
245695 |
20-Jan-2013 |
dteske |
Backward compatibility fix: treat cmds loaded as a script as nonInteractive
|
245437 |
14-Jan-2013 |
dteske |
Don't use f_show_msg() unless printf(1) syntax is required (this reduces the number of unnecessary forks).
|
245402 |
14-Jan-2013 |
dteske |
Add new f_yesno/f_noyes wrapper functions (which take printf(1) syntax).
|
245401 |
14-Jan-2013 |
dteske |
Add missing dialog(1) arguments to internationalize "Help"-button label.
|
245117 |
07-Jan-2013 |
dteske |
Update copyright following last commit.
|
245116 |
07-Jan-2013 |
dteske |
Add nonInteractive support to f_dialog_yesno/noyes().
|
245106 |
06-Jan-2013 |
dteske |
Update copyrights and dates following last commit.
|
245052 |
05-Jan-2013 |
dteske |
Add support for scripting (sysinstall style).
Reviewed by: jilles
|
244994 |
03-Jan-2013 |
dteske |
Comments.
|
244804 |
29-Dec-2012 |
dteske |
Comments.
|
244802 |
29-Dec-2012 |
dteske |
Add missing enforcement of height restriction after minor adjustment.
|
244801 |
29-Dec-2012 |
dteske |
Add support for running without a controlling terminal (for example, when running as an rvalue to a pipe).
|
244799 |
29-Dec-2012 |
dteske |
Allow debug output to be logged to a file (set $debugFile to target pathname) or both stdout and a file (precede $debugFile pathname with a plus-sign, `+').
|
244798 |
28-Dec-2012 |
dteske |
Whitespace.
|
244797 |
28-Dec-2012 |
dteske |
Fix incorrect function name. s/[[:<:]]dialog_clear/f_&/
|
244727 |
27-Dec-2012 |
dteske |
Comments and fit to 80-columns.
|
244675 |
25-Dec-2012 |
dteske |
Add more debugging to help with diagnosis of program-flow when needed.
|
244674 |
25-Dec-2012 |
dteske |
Remove unnecessary duplicate initialization of the dialog(1) API (automatically bootstrapped on-include unless DIALOG_SELF_INITIALIZE is set to NO before-hand)
|
244565 |
21-Dec-2012 |
dteske |
Split dialog(1)-based validators for hostname/netmask into two, providing transparent validators that can be used free of dialog(1) where needed.
Syntax/return of the original dialog(1)-based validators remains unchanged.
|
244563 |
21-Dec-2012 |
dteske |
Remove unused include.
|
244558 |
21-Dec-2012 |
dteske |
Change axiom for initialization. Including script can disable (default) automatic initialization by setting appropriate variable to particular value.
|
244556 |
21-Dec-2012 |
dteske |
Remove erroneous use of "local" (not in a function).
|
244555 |
21-Dec-2012 |
dteske |
New f_show_info() function for dialog(1) --infobox using printf(1) syntax.
|
244554 |
21-Dec-2012 |
dteske |
Use f_show_help() where printf(1) syntax is desired.
|
244550 |
21-Dec-2012 |
dteske |
Improve the debugging abilities and clean up debug messages. In most cases, all one has to do is set the environment variable DEBUGGING to get the debug messages to appear on the console.
|
244548 |
21-Dec-2012 |
dteske |
Add much-needed dialog(1) --inputbox function for simplifying the process of requesting input from the user.
|
243636 |
27-Nov-2012 |
dteske |
Allow setting of NULL titles with f_dialog_[back]title().
Approved by: adrian (co-mentor) (implicit)
|
243635 |
27-Nov-2012 |
dteske |
Change self-initialization to occur when loaded versus the previous behavior which was to self-initialize during the first function-call. This didn't work so well because the first call was may or may-not be within a sub-shell (which prevented proper setup of the pass-thru file descriptor, resulting in dialogs that would not display).
Approved by: adrian (co-mentor) (implicit)
|
243634 |
27-Nov-2012 |
dteske |
Comments.
Approved by: adrian (co-mentor) (implicit)
|
243504 |
25-Nov-2012 |
dteske |
Split IP address validation routines and improve error detection for dotted- quad notation in IPv6 addresses.
Approved by: adrian (co-mentor) (implicit)
|
243476 |
24-Nov-2012 |
dteske |
Whitespace.
Approved by: adrian (co-mentor) (implicit)
|
243475 |
24-Nov-2012 |
dteske |
Add IPv6 address-validation routine.
Approved by: adrian (co-mentor) (implicit)
|
243112 |
16-Nov-2012 |
dteske |
Replicate a feature from sysinstall documented in stable/9/usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
If /usr/sbin/sysinstall is linked to another filename, say `/usr/local/bin/configPackages', then the basename will be used as an implicit command name.
To get a list of modules you can link to, see `bsdconfig -h' output.
Approved by: adrian (co-mentor) (implicit)
|
242123 |
26-Oct-2012 |
dteske |
Resurrect and integrate stable/9/usr.sbin/sysinstall/help/usermgmt.hlp
Approved by: adrian (co-mentor) (implicit)
|
242119 |
26-Oct-2012 |
dteske |
Remove unnecessary quotation to clean things up.
Approved by: adrian (co-mentor) (implicit)
|
242118 |
26-Oct-2012 |
dteske |
Don't mask fwe(4) lp(4) or plip(4) devices from ifconfig(8) list.
Approved by: adrian (co-mentor) (implicit)
|
242117 |
26-Oct-2012 |
dteske |
Resurrect and integrate stable/9/sysinstall/help/tcp.hlp
Approved by: adrian (co-mentor) (implicit)
|
242115 |
26-Oct-2012 |
dteske |
Tighten-up displays that use a NULL prompt (e.g., networking and usermgmt).
Approved by: adrian (co-mentor) (implicit)
|
242114 |
26-Oct-2012 |
dteske |
Fix copy/paste error.
Approved by: adrian (co-mentor) (implicit)
|
242107 |
26-Oct-2012 |
dteske |
Switch from using a msgbox to display help files to a textbox instead. The problem with using a msgbox was one of truncation in the case of Xdialog(1) and lack of screen real-estate (since the msgbox is not scrollable in X11 while a textbox is).
The textbox renders the text much better and is more appropriate for this type of data display.
Approved by: adrian (co-mentor) (implicit)
|
242096 |
25-Oct-2012 |
dteske |
When Xdialog(1) is passed a NULL argument to its `--help' option, Xdialog(1) acts like dialog(1) in that it returns exit status 2 when the help button is chosen.
Approved by: adri (co-mentor) (implicit)
|
241899 |
22-Oct-2012 |
dteske |
Resurrect usage.hlp and securelevel.hlp from sysinstall(8) and integrate them into bsdconfig(8).
Approved by: adrian (co-mentor) (implicit)
|
241701 |
18-Oct-2012 |
dteske |
More-accurately replicate the help system from sysinstall(8). However, also improve upon the system by giving the user a "Help" button instead of requiring the user to press F1.
NOTE: In FreeBSD-9 and higher, dialog(1) does not support the F1 hook, so the mechanism for providing help to the user had to be changed to a button.
This now means we can resurrect *.hlp files from usr.sbin/sysinstall/help/ as- is and reusing them as-needed in bsdconfig (holding to the goal of losing as little functionality from sysinstall as possible).
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
241700 |
18-Oct-2012 |
dteske |
Fix a bug where blank lines were not being counted (because awk's split() function returns zero when $0 is the NULL string).
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
241673 |
18-Oct-2012 |
dteske |
Fix typo.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
241653 |
17-Oct-2012 |
dteske |
Ask to become root via sudo(8) and give user ability to save this preference.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
241499 |
13-Oct-2012 |
dteske |
SVN r240684 broke the ability of the dot module to map include dependencies. Teach the dot module about the new location these includes moved to (as part of r240684) and clean things up a bit.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
241330 |
07-Oct-2012 |
joel |
Minor mdoc fixes.
|
241149 |
03-Oct-2012 |
dteske |
Import sysutils/sysrc from the ports tree (current version 5.1). Importing disconnected under the WITH_BSDCONFIG flag (a good idea since this version of sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)).
Multiple reasons sysrc should not simply continue to live in ports. The most important being that it is tightly coupled with the base.
Approved by: adrian (co-mentor)
|
241042 |
29-Sep-2012 |
dteske |
Allow deferred word-splitting via f_sysrc_get() by allowing $IFS in the "clean-room" environment used to query rc.conf(5) parameters.
This brings bsdconfig(8)'s sysrc.subr in-line with both the sysrc(8) manual [provided by sysutils/sysrc] and sysrc(8)'s own sysrc.subr (now identical to bsdconfig(8)'s sysrc.subr as of this patch).
Finally, this will allow a clean import of sysutils/sysrc (sans sysrc.subr, already provided here).
Reviewed by: jilles Approved by: adrian (co-mentor)
|
241019 |
28-Sep-2012 |
dteske |
Sanitize varname argument in f_sysrc_find. This is as much for security as it is for sanity.
Reviewed by: jilles Approved by: adrian (co-mentor)
|
240863 |
23-Sep-2012 |
dteske |
Always use RC_CONFS when set, even if NULL. Previously only used if non-NULL.
Reviewed by: jilles, adrian (co-mentor) Approved by: adrian (co-mentor)
|
240843 |
22-Sep-2012 |
dteske |
jilles accurately advises that, in the context of shell redirection, the `:' builtin is processed specially and thus the `: > file' syntax for example will cause premature termination of the current shell on redirection-error.
The `true' builtin on the other-hand is not included in this special processing (for compatibility reasons to satisfy legacy scripts programmed for systems where `true' is not a builtin).
Change bare `: > file' syntax into `true > file' syntax to prevent premature shell termination in the event of redirection-error.
NOTE: Instances of `: > file' that appear within a sub-shell have been left unmodified as these will not cause premature termination of the main script.
Reviewed by: jilles, adrian (co-mentor) Approved by: adrian (co-mentor)
|
240798 |
22-Sep-2012 |
dteske |
Replace "( : ${var?} )" syntax with better "[ ${var+set} ]" syntax.
Reviewed by: jilles, adrian (co-mentor) Approved by: jilles, adrian (co-mentor)
|
240797 |
22-Sep-2012 |
dteske |
Spelling and whitespace corrections.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
240783 |
21-Sep-2012 |
dteske |
Reverse SVN r240770 -- jilles@ made a suggestion that allowed us to redesign our embedded rescue environment to support /dev/null making r240770 obsolete.
Reviewed by: jilles, adrian (co-mentor) Approved by: jilles, adrian (co-mentor)
|
240770 |
21-Sep-2012 |
dteske |
Replace redirections to /dev/null with "close file-descriptor" syntax (>&-).
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
240768 |
20-Sep-2012 |
dteske |
Change all invocations of dialog(1) to no-longer require temporary files. This allows bsdconfig to -- like bsdinstall -- operate from read-only media.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
240684 |
18-Sep-2012 |
dteske |
Move major includes into /usr/share/bsdconfig for easy external access.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
240518 |
14-Sep-2012 |
eadler |
Correct double "the the"
Approved by: cperciva MFC after: 3 days
|
238444 |
14-Jul-2012 |
joel |
Mdoc and whitespace fixes.
|
238438 |
14-Jul-2012 |
dteske |
Import bsdconfig(8) as a replacement for the post-install abilities of deprecated sysinstall(8). NOTE: WITH_BSDCONFIG is currently required.
Submitted by: Devin Teske (dteske), Ron McDowell <rcm@fuzzwad.org> Reviewed by: Ron McDowell <rcm@fuzzwad.org> Approved by: Ed Maste (emaste)
|