Skip to content

Commit d3949b1

Browse files
authored
Merge pull request #54 from ptomulik/fix/freebsd
do not try to run "pkg -N" on freebsd 9.1
2 parents b6e60d4 + dff4cde commit d3949b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

freebsd.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ set -e
44

55
# This bootstraps Puppet on FreeBSD
66
echo "Installing Puppet & dependencies..."
7-
if [ `sysctl -n kern.osreldate` -ge '901000' ] && pkg -N 2> /dev/null ; then
7+
# See manpage of pkg(8)
8+
# https://www.freebsd.org/cgi/man.cgi?query=pkg&apropos=0&sektion=8
9+
if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 \
10+
PACKAGESITE=file:///nonexistent \
11+
pkg info -x 'pkg(-devel)?$' >/dev/null 2>&1; then
812
pkg install -y "sysutils/puppet4"
913
else
1014
pkg_add -r puppet

0 commit comments

Comments
 (0)