diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2020-03-01 17:26:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2020-03-08 14:44:10 +0000 |
commit | 491ebaedd3bb8232585c42cc84fbdd2aa210dbf6 (patch) | |
tree | 01544e9d828f08a5b87e98686c71865dad1808c5 /lib/container | |
parent | Harmonizing hooks. (diff) | |
download | compute-tools-491ebaedd3bb8232585c42cc84fbdd2aa210dbf6.tar.xz compute-tools-491ebaedd3bb8232585c42cc84fbdd2aa210dbf6.zip |
Correcting call of post hooks in container start program to make them actually work, thanks to Simon Spoehel <simon@spoehel.ch>.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib/container')
-rwxr-xr-x | lib/container/start | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/container/start b/lib/container/start index f89944d..5938193 100755 --- a/lib/container/start +++ b/lib/container/start @@ -482,6 +482,15 @@ case "${SYSTEMCTL}" in true) systemctl start ${PROGRAM}@${NAME}.service + # Post hooks + for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" + do + if [ -x "${FILE}" ] + then + "${FILE}" + fi + done + exit 0 ;; esac @@ -498,14 +507,5 @@ case "${START}" in *) # Run ${SETARCH} systemd-nspawn --keep-unit ${BIND} ${BIND_RO} ${BOOT} ${CAPABILITY} ${DIRECTORY} ${DROP_CAPABILITY} ${MACHINE} ${NETWORK_VETH_EXTRA} ${LINK_JOURNAL} ${REGISTER} - - # Post hooks - for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" - do - if [ -x "${FILE}" ] - then - "${FILE}" - fi - done ;; esac |