installsw man page on BSDi

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDi logo
[printable version]

INSTALLSW(8)		  BSD System Manager's Manual		  INSTALLSW(8)

NAME
     installsw - install software packages to disk from installation media

SYNOPSIS
     installsw [-DELU] [-c path] [-d root_dir] [-h remote_host [-l
	       remote_user]] [-m cdrom | floppy | tape] [-s d | o | r]

DESCRIPTION
     The installsw utility is an interactive program for installing software
     packages from floppy disk, tape, or CDROM to a filesystem.	 The floppy
     disk, tape and CDROM may be either on the local computer or on a remote
     host.  In addition, installsw can be used to delete software packages
     that were previously installed.

     If no command-line arguments are specified, installsw prompts the user
     for all necessary information.

     The options are as follows:

     -c	     The -c option specifies the mount point for installation from
	     CDROM and floppy disks, and the name of the special device when
	     installing from a tape drive.

     -D	     The -D option specifies that selected packages should be deleted,
	     not installed.  As the programs that perform the deletion are
	     part of the original software archive, this mode differs little
	     from the installation mode of the program.

     -d	     The -d option specifies all software packages are installed as if
	     root_dir were the root of the filesystem, i.e. if no root_dir is
	     specified, installsw behaves as if a root_dir of / was specified.

     -E	     Treat the user as an expert, minimizing explanations and ques-
	     tions.

     -h	     The -h option specifies that the installation is being done from
	     the remote host remote_host, i.e. that the CDROM or floppy is
	     mounted on a filesystem on the remote host, or that the tape
	     drive belongs to the remote host.

     -L	     The -L option specifies that the installation is being done from
	     a local host, i.e. that the CDROM or floppy is mounted on a
	     filesystem on the local machine, or that the tape drive is a de-
	     vice on the local machine.

     -l	     By default, installsw uses the current user ID for all commands
	     executed on the remote host.  The -l option permits you to speci-
	     fy an alternate user ID for this purpose.

     -m	     The -m option specifies the media type: the supported types are
	     ``cdrom'', ``floppy'' and ``tape''.

     -s	     The -s option specifies the packages to be installed, as follows:

	     r	     Install the required packages.
	     d	     Install the required and desirable packages.
	     o	     Install the required, desirable and optional packages.
	     u	     Install the packages which are candidates for updating.

	     If the -s option is specified, there is no further interaction
	     with the user, and all necessary information must be specified on
	     the command line, i.e., the -s option requires the -c and -m op-
	     tions.  In addition, if the -s option is specified and the -h op-
	     tion is not specified, installsw expects the media to be avail-
	     able on the local machine, as specified by the -c option.

     -U	     The -U option specifies that the user is doing an update, not an
	     initial install.  This causes installsw to pre-select packages
	     that are candidates for upgrades in the initial screen, and to
	     warn the user if they select a package which would not normally
	     be installed during an update.

     If the -s option was not specified, and any necessary information is not
     specified by command-line options, installsw first prompts the user for
     it.

     All questions asked by installsw are shown as a question, a default (be-
     tween square brackets), and then a colon.	Replies are entered on the
     same line as the question.	 If the user types a return (with no other
     characters entered), the default is used.	Otherwise, the user should
     specify a case-insensitive prefix of a possible alternative, e.g.	``cd''
     and ``CDROM'' are both acceptable responses when ``cdrom'' is a possible
     answer.  If installsw is unable to determine the answer intended by the
     user, the user is re-prompted for another answer to the same question.

     To exit installsw at any time, enter an interrupt from the keyboard, usu-
     ally ^C (i.e. control-C, the key generated by entering the control key
     and the C key simultaneously).  This should only be used if absolutely
     necessary once installation or deletion has started, as packages may be
     left partially installed or deleted.

     Questions asked by installsw include:

     1.	  The media type for the installation.	The possible answers are
	  ``cdrom'', ``floppy'' and ``tape''.

     2.	  If the installation is from a remote host, or from the local comput-
	  er.  The possible answers are ``local'' and ``remote''.

     3.	  If the installation is from a remote host, the hostname of the re-
	  mote host, for example, ``mysystem.bsdi.com''. Note, the user is not
	  prompted for a user ID to be used on the remote system.  If the user
	  wishes to use a user ID other than their own, the -l option should
	  be specified.

     4.	  The mount directory (for CDROM or floppy archives) or special device
	  filename (for tape archives).	 If installation is from a cdrom or
	  floppy disk, the pathname is the place where the cdrom or floppy is
	  mounted, for example /cdrom or /mnt. If installation is from a tape
	  drive, the name of the special device where the no-rewind tape drive
	  can be found, for example /dev/nrst0.

     The user is not prompted for a non-standard root directory.  If the in-
     stallation is not intended for the normal filesystem hierarchy, i.e. un-
     der /, the -d option should be specified.

     During the question/response process, installsw will check the informa-
     tion given.  For example, when a remote host is specified, installsw will
     attempt to contact the remote host.  Or, if a CDROM on a remote host is
     specified, installsw will attempt to retrieve the ``TRANS.TBL'' file from
     the remote host.  If these tests fail, the user will be reprompted for
     the information that caused the failure.

     After the environment has been specified, installsw provides a full-
     screen interactive display of the packages that are available to be in-
     stalled (or deleted).  The name of each package is displayed preceded by
     three fields.  The first field is a selection letter, from ``a'' to
     ``z'', and from ``1'' to ``9''. By entering this letter, the user can se-
     lect/deselect an individual package.

     The second field is a status letter.  If the package has been selected,
     it is a ``+'' sign.  Otherwise, it is blank.

     The third field is a status letter, as follows:

     *	  The software package is already installed on the system.
     D	  The package is not installed, and is considered desirable.
     R	  The package is not installed, and is required for BSD/OS to run.

     If the third field is empty, it means that the package is not currently
     installed, and is completely optional.

     The commands that may be entered are:

     A	  Select all normally installed packages.  If installsw is upgrading
	  the system, (the -U option or the -s option with the ``u'' argument
	  was specified), packages which should only be installed during ini-
	  tial installation will not be selected by the ``A'' command.

     C	  Deselect all selected packages.

     D	  Select/Deselect the ``desirable'' packages, i.e. those marked with
	  an ``D'' in the status field.	 This command is a toggle: if it is
	  used to add the desirable packages to the list of selected packages,
	  entering it again will remove the desirable packages from the list
	  of selected packages.

     R	  Select/Deselect the ``required'' packages, i.e. those marked with an
	  ``R'' in the status field.  This command is a toggle: if it is used
	  to add the required packages to the list of selected packages, en-
	  tering it again will remove the required packages from the list of
	  selected packages.

     N	  Move to the next phrase, and attempt to either install or delete the
	  selected packages.

     U	  Select/Deselect the packages which are candidates for updating.
	  This command is a toggle: if it is used to add the update packages
	  to the list of selected packages, entering it again will remove the
	  update packages from the list of selected packages.

     X	  Exit installsw without further action.

     ?	  Display information on a selected package.  After entering ``?'',
	  the user will be prompted for the letter field of the package for
	  which information is desired.	 If information for that package is
	  available, it will be displayed.

     ^L	  Control-L (i.e., the key generated by entering the control key and
	  the ``L'' key simultaneously) will refresh the screen.

     If the user is deleting packages, i.e. the -D option was specified, the
     ``D'', ``R'' and ``U'' commands may not be entered.

     If the user is not deleting packages and the -U option was specified, any
     packages on the system which are candidates for updating will be automat-
     ically selected before the initial selection screen is displayed.

     If the user is not deleting packages and the -U option was not specified,
     any required and desirable packages not already present on the system
     will be automatically selected before the initial selection screen is
     displayed.

     As packages are selected, the name of the package will be highlighted in
     reverse video (if the monitor supports that functionality), and a ``+''
     sign will appear in the second field.  As packages are deselected, pack-
     age names will return to normal display and the ``+'' sign will disap-
     pear.

     There is one other feature in the display.	 As packages are selected (or
     deselected) a running total of the kilobytes of disk space required by
     them is maintained in order to assist the user in deciding what packages
     to install (or which packages to delete to free the appropriate amount of
     disk space).

     When selection is complete, installsw proceeds with package deletion or
     installation.  As it is possible for the screen to be overwritten by oth-
     er utilities, the ``^L'' key may continue to be used during installation
     to refresh the screen.

     Various utilities are used by installsw to pre-process and extract soft-
     ware packages from the archives, and their normal and error output mes-
     sages are displayed on the screen as they execute.	 For more information
     as to the meaning of these messages, see the referenced commands' manual
     pages.

     If the file /var/db/install.log already exists or can be created in the
     root tree specified (i.e.	/, or the path specified by the -d option),
     the attempt to delete or install a package is logged into that file.  If
     the file is created, it will be created readable and writable by the own-
     er and group (as modified by the user's umask).

     The four possible log messages are as follows:

	   package <name> deleted <timestamp>
	   package <name> delete FAILED <timestamp>
	   package <name> installed <timestamp>
	   package <name> install FAILED <timestamp>

     In all cases, ``<name>'' is the package name as specified by the second
     field of the archive file, and ``<timestamp>'' is the time of deletion or
     installation as returned by ctime(3).

     Any errors occurring during package deletion or installation cause
     installsw to exit without further action, except that end_install scripts
     for any packages that were successfully installed will still be executed.

     The installsw utility exits 0 on success, and >0 if an error occurs.

ARCHIVE FORMAT
     The following information is intended to permit users to create their own
     software archives for use with the installsw utility.

     If installing from a cdrom or floppy, the installsw utility reads the
     file PACKAGES/PACKAGES, which must exist in the directory specified by
     the user (either using the -c option or as a response to a prompt).  If
     installing from a tape archive, installsw interprets the first file of
     the archive as this file.	Each line of the file has eight, blank sepa-
     rated fields, which are interpreted as follows:

     1.	  The number of the file.  This field is used as the number of the
	  file on in a tape archive, as well as the order of installation.
	  The installsw utility will seek forward (or rewind and then seek
	  forward) to move to the specified file on the tape.  Any entries
	  numbered 0 will be ignored.

     2.	  The name of the file.	 This field is largely ignored by installsw
	  with one exception, ``INSTALLSW-SCRIPTS''. See below for more infor-
	  mation on these files.

     3.	  The kilobytes of disk space required to install the software pack-

	  age.

     4.	  The type of the file.	 Currently supported types are:

	  N    Normal.
	  Z    Compressed using the compress(1) utility.
	  z    Compressed using the gzip(1) utility.

     5.	  The ``preference'' of the file.  Currently supported preferences
	  are:

	  D    Desirable.

	  H    Hidden.	Any software package flagged as hidden will not be
	       displayed to the user during package selection.

	  I    Initial.	 Any software package that should be installed only
	       during an initial installation and not during an upgrade.  If
	       installsw is upgrading the system, (the -U option or the -s op-
	       tion with the ``u'' argument was specified), any software pack-
	       age marked as an initial package will be treated as already in-
	       stalled.	 If installsw is not upgrading the system, any soft-
	       ware package marked as an initial package will be treated as a
	       required package.

	  O    Optional.

	  R    Required.

     6.	  The root of the installation for this software package.

     7.	  A sentinel file that indicates that the software package has already
	  been installed.

	  For a software package to be flagged during package selection as al-
	  ready installed, the sentinel file must exist, there must be a ref-
	  erence to the package in the /var/db/install.log file, and the last
	  reference in that file must be a record of its installation.

	  For a software package to be flagged before and during package se-
	  lection as a candidate for updating, the sentinel file must exist,
	  and the last reference for the package in the /var/db/install.log
	  file not be a record of its installation.

	  Note, the /var/db/install.log file relative to the root tree speci-
	  fied (i.e.  /, or the path specified by the -d option) is checked.

	  As a special case, if installation of a package fails and the sen-
	  tinel file did not exist before the installation was attempted, the
	  sentinel file is removed.

     8.	  A short description of the package for display to the user.

     Once the file has been read in and interpreted, installsw takes special
     actions for an entry in the archive named ``INSTALLSW-SCRIPTS''. If this
     entry exists, it is immediately retrieved and extracted into the directo-
     ry /var/tmp/installsw.script. It is expected to be a directory hierarchy,
     with subdirectories named by the second field of the entries in the PACK-
     AGES file.	 There are six files that installsw treats specially when they
     are found in these subdirectories:

     delete  If this file exists, and the user specifies the -D option to
	     installsw, the corresponding entry in the software archive is
	     displayed to the user as part of package selection.  If the user
	     then selects the package, this file is executed.  The program may
	     read from stdin and write to stdout, including terminal control
	     information.  Any non-zero exit status by this script will be re-
	     flected in the final exit status of installsw.
     information
	     If this file exists, and the user requests information on a pack-
	     age by using the ? key during package selection, its contents are
	     displayed to the user.  No text formatting or pre-processing is
	     performed before this display.
     begin_install
	     If this file exists, the user is doing package installation, and
	     the user selects its corresponding entry during package selec-
	     tion, this file is executed after the user has finished package
	     selection but before any packages have been installed.  The pro-
	     gram may read from stdin and write to stdout, including terminal
	     control information.  Any non-zero exit status by this script
	     will stop packages from being installed, and will be reflected in
	     the final exit status of installsw.
     end_install
	     If this file exists, the user is doing package installation, the
	     user selects its corresponding entry during package selection,
	     and the package is successfully installed, this file is executed
	     after all selected packages have been installed.  The program may
	     read from stdin and write to stdout, including terminal control
	     information.  Any non-zero exit status by this script will be re-
	     flected in the final exit status of installsw.
     pre_install
	     If this file exists, the user is doing package installation, and
	     the user selects its corresponding entry during package selec-
	     tion, this file is executed before installing the selected pack-
	     age.  The program may write to stdout, but should not attempt to
	     read from the terminal or send terminal control information.  If
	     this script exits non-zero, the software package is not in-
	     stalled, and the non-zero exit status will be reflected in the
	     final exit status of installsw.
     post_install
	     If this file exists, the user is doing package installation, the
	     user selects its corresponding entry during package selection,
	     and the package is successfully installed, this file is executed
	     after the package is installed.  The program may write to the
	     terminal, but should not attempt to read from the terminal or
	     send terminal control information.	 Any non-zero exit status by
	     this script will be reflected in the final exit status of
	     installsw.

     All of the programs are executed with the current directory set to the
     directory in which they reside.  They may execute other programs, howev-
     er, those programs must obey the same guidelines for accessing the termi-
     nal as they do.

     Before any special files are executed, the environment variable INSTROOT
     is set to the root of the installation (i.e.  /, or the path specified by
     the -d option).

     If the user is installing software packages, once the user has completed
     the selection phase of installsw, the selected packages are installed in
     file number order.	 To install a selected package, the following steps
     occur:

     1.	  If a pre-install script exists, it is run.

     2.	  If the directory named by a path constructed of the user-specified
	  root directory, suffixed by the root path of the software package
	  (field 6) doesn't exist, it is created.  Any intermediate directo-
	  ries created as part of this process are created with file permis-

	  sions as specified by mkdir(1),  using the -p option.

     3.	  The installsw utility changes its current working directory to the
	  directory specified in step 2.

     4.	  If the software archive is being extracted from a cdrom or floppy
	  filesystem, the archive file is named based on the type of the file
	  as specified in field 4 of the PACKAGES file.

	  N    If the archive type is N, the file is named by field 2 followed
	       by the suffix ``.tar''.
	  Z    If the archive type is Z, the file is named by field 2 followed
	       by the suffix ``.tar.Z''.
	  z    If the archive type is z, the file is named by field 2 followed
	       by the suffix ``.tar.gz''.

	  If the software archive is being extracted from a tape, the archive
	  file is retrieved based on the file number as specified in field 1
	  of the PACKAGES file.

	  The archive file is appropriately pre-processed based on its type,
	  and its contents extracted.

     5.	  If a post-install script exists, it is run.

FILES
     /var/tmp/installsw.maptmp
	  The copy of the ``TRANS.TBL'' file from the remote system.
     /var/tmp/installsw.packages
	  The copy of the ``PACKAGES'' file from the remote system.
     /var/tmp/installsw.status
	  The status of commands executed on both the local and remote host.
     /var/tmp/installsw.script
	  The directory where the ``INSTALLSW-SCRIPTS'' archive entry is ex-
	  tracted.
     /var/tmp/installsw.script/<package>/begin_install
	  The name of the software package script run before any deletion or
	  installation.
     /var/tmp/installsw.script/<package>/end_install
	  The name of the software package script run after all deletion or
	  installation.
     /var/tmp/installsw.script/<package>/delete
	  The name of the software package deletion script.
     /var/tmp/installsw.script/<package>/information
	  The name of the software package information file.
     /var/tmp/installsw.script/<package>/post_install
	  The name of the software package post-installation script.
     /var/tmp/installsw.script/<package>/pre_install
	  The name of the software package pre-installation script.
     <rootdir>/var/db/install.log
	  The file where successful installation or deletion is logged.

BUGS
     Access to remote media by installsw requires that the current (or speci-
     fied user) have remote access to the remote host.

     The archive format is baroque and unwieldy.

SEE ALSO
     compress(1),  dd(1),  mt(1),  pax(1),  zcat(1)

HISTORY
     The utility first appeared in BSD/OS release 0.9.3.

 BSDI				 May 12, 1995				     7
[top]

List of man pages available for BSDi

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net