summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-11-03 12:58:14 +0000
committerbdrewery <bdrewery@FreeBSD.org>2013-11-03 12:58:14 +0000
commiteb6fbdd1a6fed9a988ce49c82cbb5b7871bb866a (patch)
tree8947bedbcc7b8f5aab4d62ed2923861482bd0916 /usr.sbin
parentbce61ff508aed35c64d3060d1db5a8b1f92d7e2f (diff)
downloadFreeBSD-src-eb6fbdd1a6fed9a988ce49c82cbb5b7871bb866a.zip
FreeBSD-src-eb6fbdd1a6fed9a988ce49c82cbb5b7871bb866a.tar.gz
MFC r257377:
Add a 'pkg bootstrap' command which will bootstrap pkg(8) without forwarding any command to it after installation. Approved by: bapt Approved by: re (gjb)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg/pkg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index 4e9bb94..ac0c7f1 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -951,6 +951,15 @@ main(__unused int argc, char *argv[])
if (bootstrap_pkg() != 0)
exit(EXIT_FAILURE);
config_finish();
+
+ if (argv[1] != NULL && strcmp(argv[1], "bootstrap") == 0)
+ exit(EXIT_SUCCESS);
+ } else {
+ if (argv[1] != NULL && strcmp(argv[1], "bootstrap") == 0) {
+ printf("pkg already bootstrapped at %s\n",
+ pkgpath);
+ exit(EXIT_SUCCESS);
+ }
}
execv(pkgpath, argv);
OpenPOWER on IntegriCloud