summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/add/pkg_add.1
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2004-03-01 21:58:21 +0000
committerkensmith <kensmith@FreeBSD.org>2004-03-01 21:58:21 +0000
commit370584b78872f5172bdacc16128e7c9ad2d8d160 (patch)
tree0b5a288636fb6557d262c44562a8be7517333ef3 /usr.sbin/pkg_install/add/pkg_add.1
parentd48c225260752c53c2b2fbf9ce45062ea73bb7ce (diff)
downloadFreeBSD-src-370584b78872f5172bdacc16128e7c9ad2d8d160.zip
FreeBSD-src-370584b78872f5172bdacc16128e7c9ad2d8d160.tar.gz
Add command line option for chrootdir, all pkg_add(8) operations will be
done inside of chroot(2) to chrootdir. Added to help with sysinstall(8) support of install to alternate root but possibly useful for setting up jails, etc. No objection from: portmgr@ Style(9) abuse due to: entire program violates style(9) Approved by: rwatson (mentor)
Diffstat (limited to 'usr.sbin/pkg_install/add/pkg_add.1')
-rw-r--r--usr.sbin/pkg_install/add/pkg_add.126
1 files changed, 26 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/add/pkg_add.1 b/usr.sbin/pkg_install/add/pkg_add.1
index 7940482..e12278b 100644
--- a/usr.sbin/pkg_install/add/pkg_add.1
+++ b/usr.sbin/pkg_install/add/pkg_add.1
@@ -28,6 +28,7 @@
.Op Fl vInfrRMS
.Op Fl t Ar template
.Op Fl p Ar prefix
+.Op Fl C Ar chrootdir
.Ar pkg-name Op Ar pkg-name ...
.Sh DESCRIPTION
The
@@ -188,6 +189,31 @@ in the staging area, the location of which is read as a string
from stdin.
The complete packing list is also read from stdin,
and the contents then acted on as normal.
+.It Fl C Ar chrootdir
+Before doing any operations
+.Xr chroot 2
+to the
+.Ar chrootdir
+directory so that all package files, and the package database, are
+installed to
+.Ar chrootdir .
+Note that
+.Ar chrootdir
+needs to be a fairly complete file system, including everything normally
+needed by
+.Xr pkg_add 8
+to run.
+This flag was added to help support operations done by
+.Xr sysinstall 8
+and is not expected to be useful for much else.
+Be careful that
+.Ar chrootdir
+is properly configured and can not be modified by normal users,
+versions of commands like
+.Xr fetch 1
+may be run inside
+.Ar chrootdir
+as a side-effect.
.El
.Pp
One or more
OpenPOWER on IntegriCloud