diff options
-rwxr-xr-x | share/hydractl/provision | 6 | ||||
-rwxr-xr-x | share/hydractl/provision-chroot | 11 | ||||
-rwxr-xr-x | share/hydractl/provision-raspi | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index 97d9937..8d20df5 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -334,6 +334,12 @@ echo "127.0.0.1 $hostname.$domain $hostname" | $SUDO tee -a $WORK/etc/hosts > /d tac $WORK/etc/hosts | $SUDO tee $WORK/etc/hosts.new > /dev/null hydra_sudo_run mv $WORK/etc/hosts.new $WORK/etc/hosts +# Apt +if [ "$version" != "sid" ]; then + echo "deb http://security.debian.org/ $version/updates main contrib non-free" | $SUDO tee $WORK/etc/apt/sources.list + echo "deb-src http://security.debian.org/ $version/updates main contrib non-free" | $SUDO tee $WORK/etc/apt/sources.list +fi + # Initial upgrade. echo "Applying initial upgrades..." hydra_sudo_run chroot $WORK/ apt-get update diff --git a/share/hydractl/provision-chroot b/share/hydractl/provision-chroot index ff771cf..e8ce9b5 100755 --- a/share/hydractl/provision-chroot +++ b/share/hydractl/provision-chroot @@ -48,6 +48,17 @@ done hydra_sudo_run mkdir -p /var/chroot hydra_sudo_run debootstrap --variant=minbase --arch $arch $version $WORK $mirror +# Apt +if [ "$version" != "sid" ]; then + echo "deb http://security.debian.org/ $version/updates main contrib non-free" | $SUDO tee $WORK/etc/apt/sources.list + echo "deb-src http://security.debian.org/ $version/updates main contrib non-free" | $SUDO tee $WORK/etc/apt/sources.list +fi + +# Initial upgrade. +echo "Applying initial upgrades..." +hydra_sudo_run chroot $WORK/ apt-get update +hydra_sudo_run chroot $WORK/ apt-get upgrade -y + # Arch specific procedures if [ "$arch" == "armel" ] || [ "$arch" == "armhf" ]; then if [ ! -f '/usr/bin/qemu-arm-static' ]; then diff --git a/share/hydractl/provision-raspi b/share/hydractl/provision-raspi index 173d776..a54422c 100755 --- a/share/hydractl/provision-raspi +++ b/share/hydractl/provision-raspi @@ -72,7 +72,7 @@ hydra_sudo_run cp /usr/bin/qemu-arm-static $WORK/usr/bin/ $CHROOT /debootstrap/debootstrap --second-stage # Apt configuration -echo "deb $mirror $version main contrib non-free" | hydra_sudo_run tee $WORK/etc/apt/sources.list > /dev/null +echo "deb $mirror $version main contrib non-free" | hydra_sudo_run tee $WORK/etc/apt/sources.list > /dev/null echo "deb http://security.debian.org/ $version/updates main contrib non-free" | hydra_sudo_run tee -a $WORK/etc/apt/sources.list > /dev/null # Basic packages |