10.0 + pkgng

Matthew Seaman matthew at FreeBSD.org
Sat Apr 19 16:22:32 UTC 2014

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=yes in the environment, or within
/usr/local/etc/pkg.conf -- like so:


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=yes in
the environment or in /usr/local/etc/pkg.conf.



Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140419/9776b97e/attachment.sig>

More information about the freebsd-questions mailing list