Check for both curl and wget for puppetlabs deb

As a host may not have wget add logic to try curl too.

Change-Id: I9a2ffeff08926eec5f4fee04fde0ddcc19004493
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-05-04 09:18:25 -04:00
parent 1d540a2ecb
commit 4fc49fc85c
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
1 changed files with 5 additions and 1 deletions

View File

@ -191,7 +191,11 @@ EOF
# the version of puppet ship by xenial.
if [ $lsbdistcodename != 'xenial' ]; then
puppet_deb=puppetlabs-release-${lsbdistcodename}.deb
wget http://apt.puppetlabs.com/$puppet_deb -O $puppet_deb
if type curl >/dev/null 2>&1; then
curl -O http://apt.puppetlabs.com/$puppet_deb
else
wget http://apt.puppetlabs.com/$puppet_deb -O $puppet_deb
fi
dpkg -i $puppet_deb
rm $puppet_deb
fi;