mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 23:08:56 +00:00
lxc-ubuntu.in: drop duplicate code
Commits15da01b393
and2e44ed1e64
conflicted and resulted in some duplicate functionality. Drop the poorer version of that block. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
adca854310
commit
09595b86de
@ -175,34 +175,6 @@ download_ubuntu()
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Installing updates"
|
||||
if [ -z "$MIRROR" ]; then
|
||||
MIRROR="http://archive.ubuntu.com/ubuntu"
|
||||
fi
|
||||
cat >> "$1/partial-${arch}/etc/apt/sources.list" << EOF
|
||||
deb $MIRROR ${release}-updates main universe
|
||||
deb http://security.ubuntu.com/ubuntu ${release}-security main universe
|
||||
EOF
|
||||
chroot "$1/partial-${arch}" apt-get update
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to update the apt cache"
|
||||
return 1
|
||||
fi
|
||||
cat > "$1/partial-${arch}"/usr/sbin/policy-rc.d << EOF
|
||||
#!/bin/sh
|
||||
exit 101
|
||||
EOF
|
||||
chmod +x "$1/partial-${arch}"/usr/sbin/policy-rc.d
|
||||
|
||||
chroot "$1/partial-${arch}" apt-get dist-upgrade -y
|
||||
ret=$?
|
||||
|
||||
rm -f "$1/partial-${arch}"/usr/sbin/policy-rc.d
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "Failed to upgrade the cache"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Serge isn't sure whether we should avoid doing this when
|
||||
# $release == `distro-info -d`
|
||||
echo "Installing updates"
|
||||
|
Loading…
Reference in New Issue
Block a user