summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/container/create6
1 files changed, 5 insertions, 1 deletions
diff --git a/libexec/container/create b/libexec/container/create
index 13a3bc8..e12fa00 100755
--- a/libexec/container/create
+++ b/libexec/container/create
@@ -30,6 +30,8 @@ MACHINES="/var/lib/machines"
SCRIPTS="/usr/share/${SOFTWARE}/create-scripts"
CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in"
+SCRIPT_OPTIONS=""
+
Parameters ()
{
GETOPT_LONGOPTIONS="name:,cnt.auto:,cnt.container-server:,cnt.overlay:,cnt.overlay-options:,cnt.start:,bind:,bind-ro:,capability:,drop-capability:,script:,verbose,"
@@ -50,6 +52,7 @@ Parameters ()
case "${1}" in
-n|--name)
NAME="${2}"
+ SCRIPT_OPTIONS="${SCRIPT_OPTIONS} --name ${NAME}"
shift 2
;;
@@ -105,6 +108,7 @@ Parameters ()
-v|--verbose)
VERBOSE="true"
+ SCRIPT_OPTIONS="${SCRIPT_OPTIONS} --verbose"
shift 1
;;
@@ -272,7 +276,7 @@ sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \
"${CONFIG_TEMPLATE}" > "${CONFIG}/${NAME}.conf"
# Run
-"${SCRIPTS}/${SCRIPT}" $(echo "${@}" | sed -e 's| -- | |')
+"${SCRIPTS}/${SCRIPT}" ${SCRIPT_OPTIONS} $(echo "${@}" | awk -F\ \-\-\ '{ print $2 }')
# Post hooks
for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"