From owner-freebsd-questions@FreeBSD.ORG Sat Apr 19 16:22:32 2014 Return-Path: Delivered-To: freebsd-questions@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 ESMTPS id 52D1A4CB for ; Sat, 19 Apr 2014 16:22:32 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D9EDD11F2 for ; Sat, 19 Apr 2014 16:22:31 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.8/8.14.8) with ESMTP id s3JGMQBP063819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 19 Apr 2014 17:22:27 +0100 (BST) (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk s3JGMQBP063819 Authentication-Results: smtp.infracaninophile.co.uk/s3JGMQBP063819; dkim=none reason="no signature"; dkim-adsp=none Message-ID: <5352A2C0.6090806@FreeBSD.org> Date: Sat, 19 Apr 2014 17:22:24 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: 10.0 + pkgng References: <53529B92.1070909@a1poweruser.com> In-Reply-To: <53529B92.1070909@a1poweruser.com> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p1rWNFRirllC1GOcNBPPgNuw11Ix3wE83" X-Virus-Scanned: clamav-milter 0.98.1 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2014 16:22:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --p1rWNFRirllC1GOcNBPPgNuw11Ix3wE83 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 19/04/2014 16:51, Fbsd8 wrote: > The handbook says to activate pkgng on a newly installed 10.0 system by= > first executeing /usr/sbin/pkg followed by pkg2ng. Both these programs > issue message that you have to enter [y or n] to continue. I want to > bury these commands in a script. There is no -y flag to bypass that > message. What is best method to code script to answer "y" to automate > script processing? If you're on a brand new install of 10.x and have never installed anything on the system using the old pkg_tools, then despite what the handbook may say, you do *not* need to run pkg2ng. You can make pkg(8) stop asking questions by setting ASSUME_ALWAYS_YES=3Dyes in the environment, or within /usr/local/etc/pkg.conf -- like so: ASSUME_ALWAYS_YES : yes; In fact, most pkg(8) commands understand -y as a command line option. Look at pkg-install(8), pkg-upgrade(8), pkg-delete(8). The /usr/sbin/pkg bootstrapping command understands ASSUME_ALWAYS_YES=3Dyes i= n the environment or in /usr/local/etc/pkg.conf. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --p1rWNFRirllC1GOcNBPPgNuw11Ix3wE83 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJTUqLCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATHGAP/3YWAopdbRleq1SzzRfIOhAt SVGCIcs3jwp5vpZgObdrwr3reZiFfu/WMcaatHEz2z0AZYxiNou1DlttLTtmklEv +TZsgEtqKtIdm4rtB+mfuog5zP2fXOX7sVGItTqBOBvxJHbS6unlW57h/ysky38m wDjvfslW86F5yM7rWr/WwqWBdBtJ3bMlAWoRRTUIM4caij39nsZkQFFjKgRIPWKX W/YtMIrFfwo9NxziYR3yEfbgcrVnm+Vm5XC8PG/jgKyUgK5dIDOw0VCn2BQ9PC/C zKcQGwnNrd9cFHP3gbqr8MbMZUTxKKVSD/Z4Kf8W266sHmgeE9ooBclbxmi3Rtbv sTuShnFoltTAyFIEbOZXxPN4dMA/4Jm00d1qXdrMyN9RoB+DntpFTpFtate2AQgL y039i7RV9xjkYtl5UsvXr26UzQ9staFBcbjpiSMXqHIqv10EdxGPNWRkYTx9w577 eikye2oawgTzBb5iJWtE34vpszxBysoB8bSnKl+uBDaRRdW1DXpWKwYXPqB8Ff06 PNnsx5JufsHsrV72q71CEp+kTVeP20I/gvTK4qTzYr65armLBM1czrY/TtqzwMET dbjy2pfXAxvskDqAQ+kjJUn2US5Vq5gq5vgN/UwftOJtRDAuIVJs4vHAtAU9fR+Q 4IIyhr3GSuNYZIGV0NAT =jm9m -----END PGP SIGNATURE----- --p1rWNFRirllC1GOcNBPPgNuw11Ix3wE83--