vagrant-lxc-base-boxes/debian/install-extras.sh

49 lines
959 B
Bash
Raw Permalink Normal View History

2014-03-25 00:26:19 -03:00
#!/bin/bash
set -e
source /etc/profile
2014-03-25 00:26:19 -03:00
echo 'Installing extra packages and upgrading'
2014-03-25 00:26:19 -03:00
2016-06-27 14:07:22 +02:00
PACKAGES=(vim curl wget man-db openssh-server bash-completion ca-certificates sudo)
2015-12-27 16:34:32 +01:00
echo "Installing additional packages: ${ADDPACKAGES}"
2015-12-27 16:34:32 +01:00
PACKAGES+=" ${ADDPACKAGES}"
2014-03-25 00:26:19 -03:00
if [ $DISTRIBUTION = 'ubuntu' ]; then
PACKAGES+=' software-properties-common'
fi
ANSIBLE=${ANSIBLE:-0}
if [[ $ANSIBLE = 1 ]]; then
PACKAGES+=' ansible'
fi
2014-03-25 00:26:19 -03:00
CHEF=${CHEF:-0}
if [[ $CHEF = 1 ]]; then
PACKAGES+=' chef'
fi
2014-03-25 00:26:19 -03:00
PUPPET=${PUPPET:-0}
if [[ $PUPPET = 1 ]]; then
PACKAGES+=' puppet'
fi
2014-03-25 00:26:19 -03:00
SALT=${SALT:-0}
if [[ $SALT = 1 ]]; then
PACKAGES+=' salt-minion'
fi
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical
apt-get update
apt-get install ${PACKAGES[*]} -y --force-yes
apt-get upgrade -y --force-yes
2014-03-25 00:26:19 -03:00
if [ $DISTRIBUTION = 'debian' ]; then
# Enable bash-completion
sed -e '/^#if ! shopt -oq posix; then/,/^#fi/ s/^#\(.*\)/\1/g' \
-i /etc/bash.bashrc
2014-03-25 00:26:19 -03:00
fi