summaryrefslogtreecommitdiff
path: root/nonsystemd/opentmpfiles/tmpfiles-hook
diff options
context:
space:
mode:
Diffstat (limited to 'nonsystemd/opentmpfiles/tmpfiles-hook')
-rw-r--r--nonsystemd/opentmpfiles/tmpfiles-hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/nonsystemd/opentmpfiles/tmpfiles-hook b/nonsystemd/opentmpfiles/tmpfiles-hook
new file mode 100644
index 000000000..786616b89
--- /dev/null
+++ b/nonsystemd/opentmpfiles/tmpfiles-hook
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+each_conf() {
+ while read -r f; do
+ "$@" "$(basename "$f")"
+ done
+}
+
+case $1 in
+ tmpfiles) each_conf /usr/bin/tmpfiles --create ;;
+ *) echo >&2 " Invalid operation '$1'"; exit 1 ;;
+esac
+
+exit 0