Permalink
Browse files

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)
  • Loading branch information...
1 parent bce61ff commit eb6fbdd1a6fed9a988ce49c82cbb5b7871bb866a @bdrewery bdrewery committed Nov 3, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 usr.sbin/pkg/pkg.c
View
@@ -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);

0 comments on commit eb6fbdd

Please sign in to comment.