summaryrefslogtreecommitdiffstats
path: root/share/doc/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-02 10:06:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-02 10:39:04 +0000
commitcebe592fb5eb4c1625cf5dcab1968c27cbc25d3e (patch)
treeb4cc270e4a2c991ba207b2329c74d11412da2403 /share/doc/examples
parentAdding upstream version 20190222. (diff)
downloadopen-infrastructure-compute-tools-cebe592fb5eb4c1625cf5dcab1968c27cbc25d3e.tar.xz
open-infrastructure-compute-tools-cebe592fb5eb4c1625cf5dcab1968c27cbc25d3e.zip
Adding upstream version 20190301.upstream/20190301
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/doc/examples')
-rwxr-xr-xshare/doc/examples/container-images.sh64
1 files changed, 0 insertions, 64 deletions
diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh
deleted file mode 100755
index f677799..0000000
--- a/share/doc/examples/container-images.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-# Description: example for automated Debian base system container image creation
-# Requires: debootstrap plzip xz-utils
-# Usage: sudo ./container-images.sh
-
-set -e
-
-ARCHITECTURES="amd64 i386"
-DISTRIBUTIONS="buster sid"
-MIRROR="https://deb.debian.org/debian"
-INCLUDE="dbus"
-
-COMPRESSIONS="gz lz xz"
-
-VERSION="$(date +%Y%m%d)"
-
-for DISTRIBUTION in ${DISTRIBUTIONS}
-do
- for ARCHITECTURE in ${ARCHITECTURES}
- do
- SYSTEM="debian-${DISTRIBUTION}-${VERSION}_${ARCHITECTURE}"
-
- debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${SYSTEM} ${MIRROR}
- chroot "${SYSTEM}" apt-get clean
-
- rm -f "${SYSTEM}/etc/apt/apt.conf.d/01autoremove-kernels"
- rm -f "${SYSTEM}/etc/hostname"
- echo "" > "${SYSTEM}/etc/machine-id"
- rm -f "${SYSTEM}/etc/resolv.conf"
- rm -f "${SYSTEM}/var/lib/systemd/catalog/database"
-
- for COMPRESSION in ${COMPRESSIONS}
- do
- case "${COMPRESSION}" in
- gz)
- TAR_OPTIONS="--gzip"
- ;;
-
- lz)
- TAR_OPTIONS="--lzip"
- ;;
-
- xz)
- TAR_OPTIONS="--xz"
- ;;
- esac
-
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}"
- tar ${TAR_OPTIONS} -cf "${SYSTEM}.system.tar.${COMPRESSION}" "${SYSTEM}"
-
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
- sha512sum "${SYSTEM}.system.tar.${COMPRESSION}" > "${SYSTEM}.system.tar.${COMPRESSION}.sha512"
-
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION} symlink"
- ln -sf "${SYSTEM}.system.tar.${COMPRESSION}" "$(echo ${SYSTEM}.system.tar.${COMPRESSION} | sed -e "s|${VERSION}|current|")"
-
- echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy"
- sed -e "s|${VERSION}|current|" "${SYSTEM}.system.tar.${COMPRESSION}.sha512" > "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sha512 | sed -e "s|${VERSION}|current|")"
- done
-
- rm -rf "${SYSTEM}"
- done
-done