From owner-svn-src-stable@FreeBSD.ORG Sun Nov 3 12:58:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6BE6CC6F; Sun, 3 Nov 2013 12:58:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 587EE2D42; Sun, 3 Nov 2013 12:58:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3CwFg1070538; Sun, 3 Nov 2013 12:58:15 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3CwFfm070537; Sun, 3 Nov 2013 12:58:15 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311031258.rA3CwFfm070537@svn.freebsd.org> From: Bryan Drewery Date: Sun, 3 Nov 2013 12:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r257571 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 12:58:15 -0000 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);