aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cortexa57-poky-linux/systemd/systemd-binfmt/latest.pkg_postinst
blob: e24d55b5f27730f802aeebc0022819ec9932f45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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