10.0 + pkgng
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:
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=yes in
the environment or in /usr/local/etc/pkg.conf.
Dr Matthew J Seaman MA, D.Phil.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1036 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions