diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-27 00:58:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-27 00:58:35 +0000 |
commit | 55019ff4757681593a80775526029c2ff1907f5c (patch) | |
tree | 947d572f3fa1a14c3809367303850524d94e92da /bin/container | |
parent | Adding upstream version 20210726. (diff) | |
download | open-infrastructure-compute-tools-55019ff4757681593a80775526029c2ff1907f5c.tar.xz open-infrastructure-compute-tools-55019ff4757681593a80775526029c2ff1907f5c.zip |
Adding upstream version 20210727.upstream/20210727
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | bin/container | 20 |
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 |