summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xshare/scripts/curl11
1 files changed, 8 insertions, 3 deletions
diff --git a/share/scripts/curl b/share/scripts/curl
index 4390dba..7d3a07d 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -26,7 +26,7 @@ CACHE="/var/cache/container-tools/images"
Parameters ()
{
- GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,clean,password:,server:,system:,"
+ GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,clean,password:,server:,setup:,system:,"
GETOPT_OPTIONS="b:,s:,n:,p:"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${SCRIPT} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -87,6 +87,11 @@ Parameters ()
shift 2
;;
+ --setup)
+ SETUP="${2}"
+ shift 2
+ ;;
+
--system)
SYSTEM="${2}"
shift 2
@@ -107,7 +112,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--system SYSTEM]" >&2
+ echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--setup SETUP] [--system SYSTEM]" >&2
exit 1
}
@@ -152,7 +157,7 @@ fi
ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
SYSTEM="${SYSTEM:-debian-stretch-${ARCHITECTURE}.system.tar.${COMPRESSION}}"
-SETUP="$(echo ${SYSTEM} | sed -e 's|.system.tar.|.setup.tar.|')"
+SETUP="${SETUP:-$(echo ${SYSTEM} | sed -e 's|.system.tar.|.setup.tar.|')}"
SERVER="${SERVER:-https://files.open-infrastructure.net/system/container/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"