diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-26 03:57:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-26 03:57:11 +0000 |
commit | f277567cc45fc61cfca8ba30d89813855440eb93 (patch) | |
tree | 2268932e0e1cb4bdd65cc17b1c3b0070d6db10d7 /share/get-scripts | |
parent | Adding upstream version 20210725. (diff) | |
download | open-infrastructure-compute-tools-upstream/20210726.tar.xz open-infrastructure-compute-tools-upstream/20210726.zip |
Adding upstream version 20210726.upstream/20210726
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | share/get-scripts/curl (renamed from share/scripts/curl) | 24 | ||||
-rwxr-xr-x | share/get-scripts/curl.d/0001-debconf (renamed from share/scripts/curl.d/0001-debconf) | 0 | ||||
-rw-r--r-- | share/get-scripts/curl.d/0001-debconf.templates (renamed from share/scripts/curl.d/0001-debconf.templates) | 2 |
3 files changed, 12 insertions, 14 deletions
diff --git a/share/scripts/curl b/share/get-scripts/curl index 98c2b82..4accea2 100755 --- a/share/scripts/curl +++ b/share/get-scripts/curl @@ -23,13 +23,12 @@ PROJECT="open-infrastructure" SOFTWARE="compute-tools" PROGRAM="container" +SCRIPT="${0}" +export SCRIPT + HOOKS="/etc/${SOFTWARE}/hooks" KEYS="/etc/${SOFTWARE}/keys" MACHINES="/var/lib/machines" -CACHE="/var/cache/${PROGRAM}/system" - -SCRIPT="${0}" -export SCRIPT Parameters () { @@ -124,7 +123,7 @@ Parameters () Usage () { - echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--setup SETUP] [--system SYSTEM]" >&2 + echo "Usage: container get -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--setup SETUP] [--system SYSTEM]" >&2 exit 1 } @@ -178,11 +177,10 @@ fi SERVER="${SERVER:-https://get.open-infrastructure.net/system/container/debian}" PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}" +CACHE="/var/cache/${PROGRAM}/get-$(basename ${SCRIPT})/$(echo ${SERVER} | sed -e 's|.*//||' -e 's|/|_|g')" VERSION="$(container version)" -export SERVER - Debconf () { # Configure local debconf @@ -269,7 +267,7 @@ then Debconf # Run debconf parts - for DEBCONF_SCRIPT in /usr/share/${SOFTWARE}/scripts/curl.d/* + for DEBCONF_SCRIPT in /usr/share/${SOFTWARE}/get-scripts/curl.d/* do if [ -x "${DEBCONF_SCRIPT}" ] then @@ -300,14 +298,14 @@ mkdir -p "${CACHE}" SETUP="${SETUP:-$(echo ${SYSTEM} | sed -e 's|.system.tar.|.setup.tar.|')}" -for FILE in "${SYSTEM}" "${SYSTEM}.sign" "${SYSTEM}.sha512" \ - "${SETUP}" "${SETUP}.sign" "${SETUP}.sha512" +for FILE in "${SYSTEM}" "${SYSTEM}.sig" "${SYSTEM}.sha512" \ + "${SETUP}" "${SETUP}.sig" "${SETUP}.sha512" do if curl --fail --head --output /dev/null --silent "${SERVER}/${FILE}" then case "${FILE}" in *.sha512) - if [ -e "${CACHE}/$(basename ${FILE} .sha512).sign" ] + if [ -e "${CACHE}/$(basename ${FILE} .sha512).sig" ] then continue fi @@ -336,12 +334,12 @@ do continue fi - if [ -e "${FILE}.sign" ] + if [ -e "${FILE}.sig" ] then echo -n "Verifying ${FILE}:" set +e - gpg --homedir "${KEYS}" --verify "${FILE}.sign" "${FILE}" > /dev/null 2>&1 + gpg --homedir "${KEYS}" --verify "${FILE}.sig" "${FILE}" > /dev/null 2>&1 GNUPG="${?}" set -e diff --git a/share/scripts/curl.d/0001-debconf b/share/get-scripts/curl.d/0001-debconf index 083d469..083d469 100755 --- a/share/scripts/curl.d/0001-debconf +++ b/share/get-scripts/curl.d/0001-debconf diff --git a/share/scripts/curl.d/0001-debconf.templates b/share/get-scripts/curl.d/0001-debconf.templates index c87e47e..c63994d 100644 --- a/share/scripts/curl.d/0001-debconf.templates +++ b/share/get-scripts/curl.d/0001-debconf.templates @@ -8,4 +8,4 @@ Default: Choices-C: ${CHOICES_C} Choices: ${CHOICES} Description: Container list: - Select the system to use for creating the container. + Select the system to use for downloading the container. |