aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst')
-rw-r--r--packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst24
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst b/packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst
new file mode 100644
index 00000000000..e24d55b5f27
--- /dev/null
+++ b/packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+if systemctl >/dev/null 2>/dev/null; then
+ OPTS=""
+
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+
+ if [ "enable" = "enable" ]; then
+ for service in systemd-binfmt.service; do
+ systemctl ${OPTS} enable "$service"
+ done
+ fi
+
+ if [ -z "$D" ]; then
+ systemctl daemon-reload
+ systemctl preset systemd-binfmt.service
+
+ if [ "enable" = "enable" ]; then
+ systemctl --no-block restart systemd-binfmt.service
+ fi
+ fi
+fi