summaryrefslogtreecommitdiffstats
path: root/libexec/container
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-07-30 20:12:12 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-08-04 17:45:44 +0000
commit494fe42b27cf150df414a57eaf689dab431929c1 (patch)
treedfa0e9bbf2c2ab4fb0c3473f2fa53aac7960c059 /libexec/container
parentReleasing version 20210804. (diff)
downloadcompute-tools-next+python.tar.xz
compute-tools-next+python.zip
python module (FIXME)next+python
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'libexec/container')
-rwxr-xr-xlibexec/container/version53
1 files changed, 28 insertions, 25 deletions
diff --git a/libexec/container/version b/libexec/container/version
index 3b33a4d..3cb0df8 100755
--- a/libexec/container/version
+++ b/libexec/container/version
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/python3
# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
@@ -17,33 +17,36 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-set -e
+from sys import exit
-PROJECT="open-infrastructure"
-SOFTWARE="compute-tools"
-PROGRAM="container"
-COMMAND="$(basename ${0})"
+import compute_tools.container as container
-HOOKS="/etc/${SOFTWARE}/hooks"
-SHARE="/usr/share/${SOFTWARE}"
+def main():
+ # run
+ container.print_version()
+
+ exit(0)
+
+if __name__ == '__main__':
+ main()
-# Pre hooks
-for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
-do
- if [ -x "${FILE}" ]
- then
- "${FILE}"
- fi
-done
-# Run
-cat "${SHARE}/VERSION.txt"
+
+
+# Pre hooks
+#for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+#do
+# if [ -x "${FILE}" ]
+# then
+# "${FILE}"
+# fi
+#done
# Post hooks
-for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
-do
- if [ -x "${FILE}" ]
- then
- "${FILE}"
- fi
-done
+#for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+#do
+# if [ -x "${FILE}" ]
+# then
+# "${FILE}"
+# fi
+#done