diff --git a/packer/http/ubuntu-12.04/preseed.cfg b/packer/http/ubuntu-12.04/preseed.cfg index 0a4d4939b..5282b5811 100644 --- a/packer/http/ubuntu-12.04/preseed.cfg +++ b/packer/http/ubuntu-12.04/preseed.cfg @@ -21,7 +21,7 @@ d-i passwd/user-uid string 900 d-i passwd/user-password password vagrant d-i passwd/user-password-again password vagrant d-i passwd/username string vagrant -d-i pkgsel/include string openssh-server cryptsetup build-essential libssl-dev libreadline-dev zlib1g-dev linux-source dkms nfs-common +d-i pkgsel/include string openssh-server cryptsetup build-essential libssl-dev zlib1g-dev linux-source nfs-common d-i pkgsel/install-language-support boolean false d-i pkgsel/update-policy select unattended-upgrades d-i pkgsel/upgrade select full-upgrade diff --git a/packer/scripts/ubuntu/update.sh b/packer/scripts/ubuntu/update.sh index 06efcf5c1..91fc0c523 100644 --- a/packer/scripts/ubuntu/update.sh +++ b/packer/scripts/ubuntu/update.sh @@ -1,5 +1,12 @@ #!/bin/bash -eux +UBUNTU_VERSION=`lsb_release -r | awk '{print $2}'` +# on 12.04 work around bad cached lists +if [[ "$UBUNTU_VERSION" == '12.04' ]]; then + apt-get clean + rm -rf /var/lib/apt/lists +fi + # Update the package list apt-get update @@ -16,3 +23,8 @@ start on networking task exec /usr/bin/apt-get update EOF + +# on 12.04 manage broken indexes on distro disc 12.04.5 +if [[ $UBUNTU_VERSION == '12.04' ]]; then + apt-get -y install libreadline-dev dpkg +fi