summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-02-26 02:55:28 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-02-26 02:55:28 +0000
commitf673cbcab3a6e61f36be498d52f2767e891d1c08 (patch)
tree6691c93b051c7f67f04a03c7cc5d80d33eb161fa /share
parentRemoving Force-LoopBreak option when calling apt in container debconf create ... (diff)
downloadcompute-tools-f673cbcab3a6e61f36be498d52f2767e891d1c08.tar.xz
compute-tools-f673cbcab3a6e61f36be498d52f2767e891d1c08.zip
Using apt instead of apt-get in container debconf create script.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share')
-rwxr-xr-xshare/scripts/debconf22
-rwxr-xr-xshare/scripts/debootstrap2
2 files changed, 12 insertions, 12 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index b218bef..31f5bf2 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -174,22 +174,22 @@ EOF
chmod 0755 "${DIRECTORY}/usr/sbin/policy-rc.d"
# Upgrade system
- Chroot "${DIRECTORY}" "apt-get update"
- Chroot "${DIRECTORY}" "apt-get --yes --option Dpkg::Options::=--force-confnew upgrade"
- Chroot "${DIRECTORY}" "apt-get --yes --option Dpkg::Options::=--force-confnew dist-upgrade"
+ Chroot "${DIRECTORY}" "apt update"
+ Chroot "${DIRECTORY}" "apt --yes --option Dpkg::Options::=--force-confnew upgrade"
+ Chroot "${DIRECTORY}" "apt --yes --option Dpkg::Options::=--force-confnew dist-upgrade"
# Install systemd support packages
- Chroot "${DIRECTORY}" "apt-get --yes install dbus libpam-systemd systemd-sysv"
+ Chroot "${DIRECTORY}" "apt --yes install dbus libpam-systemd systemd-sysv"
- Chroot "${DIRECTORY}" "apt-get clean"
+ Chroot "${DIRECTORY}" "apt clean"
}
Cleanup_system ()
{
DIRECTORY="${1}"
- Chroot "${DIRECTORY}" "apt-get --yes --purge autoremove"
- Chroot "${DIRECTORY}" "apt-get clean"
+ Chroot "${DIRECTORY}" "apt --yes --purge autoremove"
+ Chroot "${DIRECTORY}" "apt clean"
# Cleanup
rm -f "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/${SOFTWARE}"
@@ -341,7 +341,7 @@ EOF
esac
Chroot "${DIRECTORY}" "apt-key add /usr/share/progress-linux/pgp-keys/apt.progress-linux.org.gpg"
- Chroot "${DIRECTORY}" "apt-get update"
+ Chroot "${DIRECTORY}" "apt update"
;;
esac
}
@@ -629,15 +629,15 @@ EOF
# This is suboptimal, ideally we should install all packages but not run the maintainer scripts,
# then run lxc-support, and run the maintainer scripts. This way, lxc-support would see
# all the installed packages and could skip those scripts entirely when a certain package is not
- # installed. Unfortunately, that is not possible in any reasonable way with apt-get.
- # FTR: The only known workaround for now would be to first apt-get install --download-only all
+ # installed. Unfortunately, that is not possible in any reasonable way with apt.
+ # FTR: The only known workaround for now would be to first apt install --download-only all
# packages, then unpack them with dpkg, run lxc-support, and dpkg --configure them.
# For the time being, it's better to have lxc-support see no packages at all and be run before
# packages are installed, than the other way around.
# Workaround: We're running lxc-support at the end of the template again.
if [ -n "${PACKAGES}" ]
then
- Chroot "${DIRECTORY}" "apt-get --option Dpkg::Options::=--force-confnew --yes install ${PACKAGES}"
+ Chroot "${DIRECTORY}" "apt --option Dpkg::Options::=--force-confnew --yes install ${PACKAGES}"
fi
# Manual hack to regenerate ssh keys
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index 7910ac3..aefdbab 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -163,7 +163,7 @@ done
mkdir -p "${MACHINES}"
debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR}
-chroot "${MACHINES}/${NAME}" apt-get clean
+chroot "${MACHINES}/${NAME}" apt clean
# Setting hostname
echo "${NAME}" > "${MACHINES}/${NAME}/etc/hostname"