Date: Sat, 19 Apr 2014 17:22:24 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: 10.0 + pkgng Message-ID: <5352A2C0.6090806@FreeBSD.org> In-Reply-To: <53529B92.1070909@a1poweruser.com> References: <53529B92.1070909@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5352A2C0.6090806>