Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu: use dist-upgrade and install build packages in preseed #551

Merged
merged 1 commit into from
Mar 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion http/ubuntu-12.04/preseed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 zlib1g-dev linux-source nfs-common
d-i pkgsel/include string openssh-server cryptsetup build-essential libssl-dev zlib1g-dev linux-source nfs-common linux-headers-$(uname -r) perl
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select unattended-upgrades
d-i pkgsel/upgrade select full-upgrade
Expand Down
2 changes: 1 addition & 1 deletion http/ubuntu-14.04/preseed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 libreadline-dev zlib1g-dev linux-source dkms nfs-common linux-headers-$(uname -r) perl
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select unattended-upgrades
d-i pkgsel/upgrade select full-upgrade
Expand Down
2 changes: 1 addition & 1 deletion http/ubuntu-15.10/preseed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 libreadline-dev zlib1g-dev linux-source dkms nfs-common linux-headers-$(uname -r) perl
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select unattended-upgrades
d-i pkgsel/upgrade select full-upgrade
Expand Down
16 changes: 7 additions & 9 deletions scripts/ubuntu/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ if [ "$ubuntu_version" = "12.04" ]; then
rm -rf /var/lib/apt/lists;
fi

# Disable release-upgrades
sed -i.bak 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades;

# Update the package list
apt-get update;
apt-get -y update;

# Upgrade all installed packages incl. kernel and kernel headers
if [ "$ubuntu_major_version" -lt 14 ]; then
apt-get -y upgrade linux-server linux-headers-server;
else
apt-get -y upgrade linux-generic;
fi

# ensure the correct kernel headers are installed
apt-get -y install linux-headers-`uname -r`;
apt-get -y dist-upgrade --force-yes;
reboot;
sleep 60;

# update package index on boot
cat <<EOF >/etc/init/refresh-apt.conf;
Expand Down