diff options
Diffstat (limited to 'usr.sbin/pkg_install/add/pkg_add.1')
| -rw-r--r-- | usr.sbin/pkg_install/add/pkg_add.1 | 67 |
1 files changed, 52 insertions, 15 deletions
diff --git a/usr.sbin/pkg_install/add/pkg_add.1 b/usr.sbin/pkg_install/add/pkg_add.1 index 9740467f961e..5efdf8b4f3f9 100644 --- a/usr.sbin/pkg_install/add/pkg_add.1 +++ b/usr.sbin/pkg_install/add/pkg_add.1 @@ -15,7 +15,7 @@ .\" .\" .\" @(#)pkg_add.1 -.\" $Id$ +.\" $Id: pkg_add.1,v 1.26 1998/07/14 08:27:58 jkoshy Exp $ .\" .Dd November 25, 1994 .Dt pkg_add 1 @@ -48,10 +48,10 @@ attacks from miscreants who create dangerous package files. You are advised to verify the competence and identity of those who provide installable package files. For extra protection, use the .Fl M -flag to extract the package file, and inspect its contents and scripts -to insure it poses no danger to your system's integrity. Pay particular -attention to any +INSTALL, +DEINSTALL, +REQUIRE or +MTREE_DIRS files, -and inspect the +CONTENTS file for +flag to extract the package file, and inspect its contents and scripts to +insure it poses no danger to your system's integrity. Pay particular +attention to any +INSTALL, +POST-INSTALL, +DEINSTALL, +POST-DEINSTALL, ++REQUIRE or +MTREE_DIRS files, and inspect the +CONTENTS file for .Cm @cwd , .Cm @mode (check for setuid), @@ -78,7 +78,8 @@ will search them in each directory named by .It Fl v Turn on verbose output. .It Fl I -If an installation script exists for a given package, do not execute it. +If a installation scripts (pre-install or post-install) exist for a given +package, do not execute them. .It Fl n Don't actually install a package, just report the steps that would be taken if it was. @@ -197,7 +198,7 @@ passive mode .Ef ftp. .Sh TECHNICAL DETAILS -.Nm Pkg_add +.Nm pkg_add is fairly simple. It extracts each package's "packing list" into a special staging directory, parses it, and then runs through the following sequence to fully extract the contents: @@ -244,18 +245,32 @@ is the name of the package in question and the keyword denotes this as an installation requirements check (useful if you want to have one script serving multiple functions). .It -If an -.Ar install -script exists for the package, it is then executed with the following arguments: +If a +.Ar pre-install +script exists for the package, it is then executed with the following +arguments: .Bd -filled -offset indent -compact +.Cm script .Ar pkg-name -.Ar PRE-INSTALL +.Ar PRE-INSTALL .Ed + where .Ar pkg-name is the name of the package in question and .Ar PRE-INSTALL is a keyword denoting this as the preinstallation phase. + +.Cm Note: +The +.Ar PRE-INSTALL +keyword will not appear if separate scripts for pre-install and post-install +are given during package creation time (using the +.Cm Fl i +and +.Cm Fl I +flags to +.Xr pkg_create 1 ). .It If .Cm @option extract-in-place @@ -289,17 +304,39 @@ flag was specified, the name of the first directory named by a .Cm @cwd directive within this package. .It -If an -.Ar install +If a +.Ar post-install script exists for the package, it is then executed as .Bd -filled -offset indent -compact .Cm script .Ar pkg-name .Ar POST-INSTALL .Ed -This all allows you to write a single +where +.Ar pkg-name +is the name of the package in question and +.Ar POST-INSTALL +is a keyword denoting this as the post-installation phase. + +.Cm Note: +The +.Ar POST-INSTALL +keyword will not appear if separate scripts for pre-install and post-install +are given during package creation time (using the +.Cm Fl i +and +.Cm Fl I +flags to +.Xr pkg_create 1 ). + +Reasoning behind passing keywords such as +.Ar POST-INSTALL +and +.Ar PRE-INSTALL +is that this allows you to write a single .Ar install -script that does both ``before and after'' actions. +script that does both ``before and after'' actions. But, separating the +functionality is more advantageous and easier from a maintainence viewpoint. .It After installation is complete, a copy of the packing list, .Ar deinstall |
