diff options
Diffstat (limited to 'lib/container/version')
-rwxr-xr-x | lib/container/version | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/container/version b/lib/container/version index b57c17d..f72355e 100755 --- a/lib/container/version +++ b/lib/container/version @@ -18,6 +18,25 @@ set -e +HOOKS="/etc/container-tools/hooks" SHARE="/usr/share/container-tools" +# Pre hooks +for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}" +do + if [ -x "${FILE}" ] + then + "${FILE}" + fi +done + cat "${SHARE}/VERSION.txt" + +# Post hooks +for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" +do + if [ -x "${FILE}" ] + then + "${FILE}" + fi +done |