Commit Graph

14135 Commits

Author SHA1 Message Date
Devin Teske
65c7c08716 Style/comments. 2013-06-15 13:38:21 +00:00
Devin Teske
c6f73e3099 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.
2013-06-14 19:35:30 +00:00
Devin Teske
f184cec5a9 Make the default choice for FTP media access use "auto". 2013-06-11 03:37:29 +00:00
Devin Teske
641cb9ccd9 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.
2013-06-09 15:36:13 +00:00
Baptiste Daroussin
8ad6d9175c Fix a bad calloc(3) call
MFC after:	2 weeks
2013-06-08 23:48:13 +00:00
Devin Teske
d7b85d2789 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).
2013-06-08 21:45:32 +00:00
Devin Teske
04d380df0c 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.
2013-06-08 21:33:09 +00:00
Devin Teske
9039c2f6f7 Fix a typo in comments. 2013-06-08 21:11:26 +00:00
Devin Teske
2d0797c6dd Don't silently ignore errors (found while
testing with `chflags schg /etc/ttys).
2013-06-08 20:47:43 +00:00
Devin Teske
f5e1223b85 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).
2013-06-08 20:43:13 +00:00
Devin Teske
5e66bd88c9 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.
2013-06-08 20:27:16 +00:00
Devin Teske
9b897ae786 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.
2013-06-08 19:13:49 +00:00
Devin Teske
528318ae53 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.
2013-06-08 18:23:41 +00:00
Devin Teske
350db06539 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.
2013-06-08 18:13:42 +00:00
Devin Teske
7ca5c4cbc6 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).
2013-06-08 18:08:17 +00:00
Devin Teske
edc6918e0b 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.
2013-06-08 17:46:39 +00:00
Devin Teske
3196cddc5d 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.
2013-06-08 17:36:31 +00:00
Devin Teske
f82913db88 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
2013-06-08 16:49:19 +00:00
Devin Teske
2a90fca013 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
2013-06-08 16:28:08 +00:00
Sean Bruno
06f1884fa8 Implement foreign volume handling. Allows admins to view foreign metadata
and clear or import it for use.

PR:     kern/172091
Submitted by:   smh@freebsd.org
Reviewed by:    jhb@freebsd.org
MFC after:      2 weeks
2013-06-08 02:54:59 +00:00
Xin LI
410bcf7cc7 Make 'portsnap alfred' overwrite ports tree if it's not created by a
portsnap.

Discussed with:	alfred
Reviewed by:	cperciva
2013-06-07 20:21:30 +00:00
Rick Macklem
35ab0ce9ca Fix r251444 so that gssd.c still builds for WITHOUT_KERBEROS.
Reported by:	bf1783@gmail.com
MFC after:	2 weeks
2013-06-06 22:02:03 +00:00
Rick Macklem
d15f63f2fe Document the new "-v" option for the gssd daemon.
This is a content change.

MFC after:	2 weeks
2013-06-05 23:28:29 +00:00
Rick Macklem
7e301aa928 Add a "-v" (verbose) option to the gssd daemon, to help
with diagnosis of kerberized NFS mount problems. When set,
messages are sent to syslog() (or fprintf(stderr,...) if
"-d" is also specified) to indicate activity/results of
kgssapi upcalls.

Reviewed by:	jhb
MFC after:	2 weeks
2013-06-05 23:17:39 +00:00
Xin LI
c84739b210 Use calloc().
MFC after:	2 weeks
2013-06-05 21:56:29 +00:00
Xin LI
ac8e13960d Remove unneeded reference to link.h (sys/link_elf.h).
MFC after:	2 weeks
2013-06-05 21:55:20 +00:00
Devin Teske
291a501e40 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
2013-06-04 17:08:26 +00:00
Devin Teske
595e514d0d 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
2013-06-04 16:48:23 +00:00
Devin Teske
44392705fa 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.
2013-06-04 03:47:21 +00:00
Devin Teske
97142e6ae7 Use a case-statement instead of multiple (separate even) if-statements. 2013-06-04 03:38:16 +00:00
Devin Teske
b988241f05 Comments. 2013-06-04 03:37:35 +00:00
Devin Teske
b5bd0bacd6 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().
2013-06-04 03:30:44 +00:00
Devin Teske
83822902c2 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.
2013-06-04 00:42:31 +00:00
Devin Teske
b87d5f1f1f 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.
2013-06-04 00:38:19 +00:00
Devin Teske
fe9ef40c68 Whitespace and comments. 2013-06-04 00:35:57 +00:00
Devin Teske
790062d26b Improve debugging for f_dialog_*_constrain() to print constrained rather
than unconstrained values.
2013-06-04 00:30:05 +00:00
Brian Somers
6a3193a773 Move ppp.8.m4 back to ppp.8 and de-ifdef it.
Requested by: joel

MFC after:	1 week
2013-06-02 23:56:38 +00:00
Devin Teske
dd5cc066af Like r250701, introduce another handy function for truncating variables to a
specific byte-length. Works like vsnprintf(3).
2013-06-02 23:25:27 +00:00
Devin Teske
f8e121ed61 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.
2013-06-02 23:23:29 +00:00
Devin Teske
e4cb6ac115 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.
2013-06-02 23:20:46 +00:00
Devin Teske
faf9d0ce1c 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.
2013-06-02 23:18:27 +00:00
Devin Teske
538d68ea69 Fix a bug in which the user's choice to Cancel was not properly recognized. 2013-06-02 23:15:12 +00:00
Devin Teske
3b4e309862 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.
2013-06-02 23:12:32 +00:00
Devin Teske
10908a6f19 Fix a copy/paste error within a comment. 2013-06-02 23:08:21 +00:00
Devin Teske
80ae9845f5 Add some additional debugging to the common media library. 2013-06-02 23:06:33 +00:00
Devin Teske
c01472c194 Make some obvious consolidations in local declaration for readability. 2013-06-02 23:05:01 +00:00
Devin Teske
51c41087d1 Standardize NULL initialization to be consistent. 2013-06-02 23:02:56 +00:00
Devin Teske
80433743e3 Use f_isset() (introduced by r250317) instead of `f_quietly f_getvar ...'. 2013-06-02 22:54:36 +00:00
Devin Teske
42ade6a964 Make proper use of locals in f_dialog_init(). 2013-06-02 22:45:54 +00:00
Devin Teske
f4844f65a9 Improvements to whitespace and comments. 2013-06-02 22:34:40 +00:00