History log of /freebsd-10.1-release/usr.sbin/bsdconfig/share/script.subr
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 263980 31-Mar-2014 dteske

MFC revisions 260894,260899,262895-262902,262904,262908-262910,262982,
262984,263133-263137,263139,263141,263144-263150, and (partially) 263249
(31 revisions; summarized below)...
r260894: Optimize f_expand_number(), improving performance
r260899: s/__number/__num/ in f_expand_number()
r262895: Allow dispatched reswords to carry arguments
r262896: Add missing local declaration
r262897: Fix a typo in a comment
r262898: Fix incorrect return status if var_to_set and var_to_get are same
r262899: Make f_show_err non-fatal
r262900: Centralize function name; Update a comment while here
r262901: s/__num/__number/ in f_expand_number()
r262902: Comment to go with NL global introduced by previous commit
r262904: Rewrite groupmgmt -- hooking it into the scripting system
r262908: Change dispatch words from group* to *Group for backward compat
r262909: Fix copy/paste error in a comment
r262910: Take a group name on the command-line if available
r262982: Whitespace
r262984: Remove vestigial global, no longer used since r262904
r263133: Remove indexfile from debug statement (already logged)
r263134: Add debug statement just before attempting to exec a module
r263135: Comments
r263136: Update copyright
r263137: Fix future namespace issues for functions taking $var_to_set
r263139: Remove useless NULL string in compound strings
r263141: Pointy hat! Fix a broken f_isinteger()
r263144: Fix a code-typo that prevented auto-sizing of a dialog
r263145: Fix comments and whitespace
r263146: Reduce the sleep cycle when using dialog(1) [infobox] to 1-second
r263147: Fix a bug preventing errors from pw(8) from appearing
r263148: For non-interactive scripts, forgot to check argument
r263149: Add protection against input containing single-quotes
r263150: Rewrite usermgmt
r263249: (partial) Add more obsolete files


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 252987 07-Jul-2013 dteske

Fix typos in the BSD License.


# 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.


# 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).


# 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.


# 252746 04-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 04-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.


# 252743 04-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).


# 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).


# 251997 19-Jun-2013 dteske

Alphabetize reserved-word (resword) registration.


# 251996 19-Jun-2013 dteske

Alphabetize includes.


# 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.).


# 250318 07-May-2013 dteske

Re-organize and add missing installVarDefaults and mediaSetDirectory.


# 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.


# 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.


# 245695 20-Jan-2013 dteske

Backward compatibility fix: treat cmds loaded as a script as nonInteractive


# 245052 05-Jan-2013 dteske

Add support for scripting (sysinstall style).

Reviewed by: jilles