summaryrefslogtreecommitdiffstats
path: root/bin/container
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-27 00:58:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-27 00:59:00 +0000
commit71ec84349d0f21c605d16f5334e58b31b0eeee8e (patch)
treeec9ad23b5013dba8f4d2222d368e69830f281c5c /bin/container
parentReleasing debian version 20210726-1. (diff)
downloadopen-infrastructure-compute-tools-71ec84349d0f21c605d16f5334e58b31b0eeee8e.tar.xz
open-infrastructure-compute-tools-71ec84349d0f21c605d16f5334e58b31b0eeee8e.zip
Merging upstream version 20210727.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/container')
-rwxr-xr-xbin/container20
1 files changed, 14 insertions, 6 deletions
diff --git a/bin/container b/bin/container
index e284c23..172caec 100755
--- a/bin/container
+++ b/bin/container
@@ -32,6 +32,8 @@ if [ -z "${PARAMETER}" ]
then
echo "Usage: ${PROGRAM} COMMAND [OPTIONS]" >&2
echo "Usage: ${PROGRAM} COMMAND1,COMMAND2,... [COMMON_OPTIONS]" >&2
+ echo
+ echo "See ${PROGRAM}(1) and ${PROJECT}(7) for more information."
exit 1
fi
@@ -40,9 +42,9 @@ COMMANDS="${1}"
# Options
shift 1
-OPTIONS="${@}"
+OPTIONS="${*}"
-for COMMAND in $(echo ${COMMANDS} | sed -e 's|,| |g')
+for COMMAND in $(echo "${COMMANDS}" | sed -e 's|,| |g')
do
if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ]
then
@@ -65,7 +67,7 @@ do
OPTIONS="$(echo "${OPTIONS}" | sed -e 's|--no-notification||')"
else
case "${COMMAND}" in
- build|b|move|mv|remove|rm|restart|rt|start|s|stop|t)
+ build|b|get|g|move|mv|remove|rm|restart|rt|start|s|stop|t|update|u)
if [ -z "${CONTAINER_USER}" ]
then
CONTAINER_USER="${SUDO_USER:-${USER}}"
@@ -78,15 +80,21 @@ do
echo "${DATE} ${HOST} ${CONTAINER_USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${SOFTWARE}/${PROGRAM}.log"
# irc
- if [ -e /usr/bin/irk ] && [ -e "/etc/${SOFTWARE}.conf" ]
+ if [ -e /usr/bin/irk ]
then
- . "/etc/${SOFTWARE}.conf"
+ for FILE in "/etc/${SOFTWARE}/${PROGRAM}.conf" "/etc/${SOFTWARE}/${PROGRAM}.conf.d"/*.conf
+ do
+ if [ -e "${FILE}" ]
+ then
+ . "${FILE}"
+ fi
+ done
if [ -n "${IRK_TARGETS}" ]
then
for TARGET in ${IRK_TARGETS}
do
- irk ${TARGET} "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}"
+ irk "${TARGET}" "\x0300${CONTAINER_USER}\x03@\x0312${HOST}:\x03 \x0303${PROGRAM}\x03 \x0307${COMMAND}\x03 ${OPTIONS}"
done
fi
fi