svn commit: r257571 - stable/10/usr.sbin/pkg

Bryan Drewery bdrewery at FreeBSD.org
Sun Nov 3 12:58:15 UTC 2013


Author: bdrewery (ports committer)
Date: Sun Nov  3 12:58:14 2013
New Revision: 257571
URL: http://svnweb.freebsd.org/changeset/base/257571

Log:
  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)

Modified:
  stable/10/usr.sbin/pkg/pkg.c
Directory Properties:
  stable/10/usr.sbin/pkg/   (props changed)

Modified: stable/10/usr.sbin/pkg/pkg.c
==============================================================================
--- stable/10/usr.sbin/pkg/pkg.c	Sun Nov  3 12:14:53 2013	(r257570)
+++ stable/10/usr.sbin/pkg/pkg.c	Sun Nov  3 12:58:14 2013	(r257571)
@@ -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);


More information about the svn-src-all mailing list