Hi
I'm trying to install pkg via a shell script on a fresh install FreeBSD 10. I'm new to shell scripting and I tried to search the forum and elsewhere but no luck. My script is a simple one just to prepare the server with some basic set up. I want to use
I need to get this "y" pressed so I tried this.
But doesn't work. How do I get that question answered with a "y"?
pkg() don't seem to give the answer.
Any help will be appreciated.
Cheers
I'm trying to install pkg via a shell script on a fresh install FreeBSD 10. I'm new to shell scripting and I tried to search the forum and elsewhere but no luck. My script is a simple one just to prepare the server with some basic set up. I want to use
pkg
to install but it needs to be install separately.
Code:
# pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:
I need to get this "y" pressed so I tried this.
Code:
if [ -f /usr/local/sbin/pkg ]; then
/usr/local/sbin/pkg update
else
pkg < /usr/bin/yes
fi
But doesn't work. How do I get that question answered with a "y"?
pkg() don't seem to give the answer.
Any help will be appreciated.
Cheers