diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-06 13:56:06 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-06 13:56:06 -0300 |
commit | 02e22f6e8f3c6438ccccb126f36c35426e2f725f (patch) | |
tree | 4eac46e9ce41b444ec41031cd5dd248371fb97f9 /bin/dependencies | |
parent | 1556252c2a083bf53bc2a75e4a3295d8f1a50210 (diff) | |
download | puppet-bootstrap-02e22f6e8f3c6438ccccb126f36c35426e2f725f.tar.gz puppet-bootstrap-02e22f6e8f3c6438ccccb126f36c35426e2f725f.tar.bz2 |
Dependencies update
Diffstat (limited to 'bin/dependencies')
-rwxr-xr-x | bin/dependencies | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/dependencies b/bin/dependencies index c410852..7fda4fb 100755 --- a/bin/dependencies +++ b/bin/dependencies @@ -13,10 +13,16 @@ function provision_package { if [ "$?" == "1" ]; then echo "Installing package $1..." - DEBIAN_FRONTEND=noninteractive apt-get install $1 -y + DEBIAN_FRONTEND=noninteractive $sudo apt-get install $1 -y fi } +# Set sudo config +local sudo device rsync +if [ "`whoami`" != 'root' ]; then + sudo="sudo" +fi + # Ensure basic packages are installed. for package in puppet ruby-hiera-puppet mr whois; do provision_package $package |