summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-12-20 17:28:19 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2017-01-28 21:30:57 +0000
commita35ae60cd44b21db89e6407db8778bf50b2e576d (patch)
treea51a88c679a2eef867cb64e356ca96ca40d94a83
parentReleasing version 20170101. (diff)
downloadcompute-tools-a35ae60cd44b21db89e6407db8778bf50b2e576d.tar.xz
compute-tools-a35ae60cd44b21db89e6407db8778bf50b2e576d.zip
Preparing common hooks.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rw-r--r--Makefile2
-rwxr-xr-xbin/container3
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9e6966e..80f2c7d 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,7 @@ install: build
cp -r lib/* $(DESTDIR)/usr/lib/$(SOFTWARE)
mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE)
- cp -r VERSION.txt share/config share/scripts ${DESTDIR}/usr/share/$(SOFTWARE)
+ cp -r VERSION.txt share/config share/hooks share/scripts ${DESTDIR}/usr/share/$(SOFTWARE)
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions
cp -r share/bash-completion/* $(DESTDIR)/usr/share/bash-completion/completions
diff --git a/bin/container b/bin/container
index a23f274..805dba6 100755
--- a/bin/container
+++ b/bin/container
@@ -20,6 +20,7 @@ set -e
SOFTWARE="container-tools"
PROGRAM="container"
+export SOFTWARE PROGRAM
HOOKS="/etc/${SOFTWARE}/hooks"
@@ -34,6 +35,7 @@ fi
# Command
COMMAND="${1}"
+export COMMAND
if [ ! -e "/usr/lib/${SOFTWARE}/${PROGRAM}/${COMMAND}" ]
then
@@ -44,6 +46,7 @@ fi
# Options
shift 1
OPTIONS="${@}"
+export OPTIONS
# Pre hooks
for FILE in "${HOOKS}/pre-${PROGRAM}".* "${HOOKS}/${NAME}.pre-${PROGRAM}"