From 1570a147fe312644a050759430f916a07d36581c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sp=C3=B6hel?= Date: Mon, 19 Apr 2021 09:56:53 +0200 Subject: Adding option to select config-template. --- libexec/container/get | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'libexec/container/get') diff --git a/libexec/container/get b/libexec/container/get index 2b41ba8..ad98f45 100755 --- a/libexec/container/get +++ b/libexec/container/get @@ -27,13 +27,12 @@ COMMAND="$(basename ${0})" CONFIG="/etc/${SOFTWARE}/config" HOOKS="/etc/${SOFTWARE}/hooks" MACHINES="/var/lib/machines" -SCRIPTS="/usr/share/${SOFTWARE}/get-scripts" -CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in" +SCRIPTS="/usr/share/${SOFTWARE}/scripts" Parameters () { - GETOPT_LONGOPTIONS="name:,cnt.container-server:,cnt.overlay:,cnt.overlay-options:,start:,bind:,bind-ro:,capability:,drop-capability:,script:,verbose," - GETOPT_OPTIONS="n:,b:,c:,d:,s:,v," + GETOPT_LONGOPTIONS="name:,cnt.container-server:,cnt.overlay:,cnt.overlay-options:,start:,bind:,bind-ro:,capability:,drop-capability:,script:,config-template:,verbose," + GETOPT_OPTIONS="n:,b:,c:,d:,s:,t:,v," PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})" @@ -103,6 +102,11 @@ Parameters () shift 2 ;; + -t|--config-template) + CONFIG_TEMPLATE="${2}" + shift 2 + ;; + -v|--verbose) VERBOSE="true" shift 1 @@ -180,6 +184,12 @@ else fi fi +case "${CONFIG_TEMPLATE}" in + '') + CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in" + ;; +esac + case "${VERBOSE}" in true) -- cgit v1.2.3