summaryrefslogtreecommitdiffstats
path: root/share/get-scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-25 07:54:36 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-26 03:46:53 +0000
commitb5b74b561d10b8c627bcf49b0234d1fb22b9c09f (patch)
tree4cb9b334ea77f56a7ffe0a29416d687ef191fc7b /share/get-scripts
parentRenaming container create command to container build. (diff)
downloadcompute-tools-b5b74b561d10b8c627bcf49b0234d1fb22b9c09f.tar.xz
compute-tools-b5b74b561d10b8c627bcf49b0234d1fb22b9c09f.zip
Making previous container curl create script a container get script.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/get-scripts/curl (renamed from share/build-scripts/curl)14
-rwxr-xr-xshare/get-scripts/curl.d/0001-debconf (renamed from share/build-scripts/curl.d/0001-debconf)0
-rw-r--r--share/get-scripts/curl.d/0001-debconf.templates (renamed from share/build-scripts/curl.d/0001-debconf.templates)2
3 files changed, 7 insertions, 9 deletions
diff --git a/share/build-scripts/curl b/share/get-scripts/curl
index 98c2b82..435e8e9 100755
--- a/share/build-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
diff --git a/share/build-scripts/curl.d/0001-debconf b/share/get-scripts/curl.d/0001-debconf
index 083d469..083d469 100755
--- a/share/build-scripts/curl.d/0001-debconf
+++ b/share/get-scripts/curl.d/0001-debconf
diff --git a/share/build-scripts/curl.d/0001-debconf.templates b/share/get-scripts/curl.d/0001-debconf.templates
index 59319e4..c63994d 100644
--- a/share/build-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 building the container.
+ Select the system to use for downloading the container.