aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cortexa57-poky-linux/lttng-tools/lttng-tools/latest.pkg_postinst
blob: 4c9ed36dedce895d34ea21ee7f51bf54339b337d (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
25
26
27
#!/bin/sh
set -e
if systemctl >/dev/null 2>/dev/null; then
	OPTS=""

	if [ -n "$D" ]; then
		OPTS="--root=$D"
	fi

	if [ "disable" = "enable" ]; then
		for service in lttng-sessiond.service; do
			systemctl ${OPTS} enable "$service"
		done
	fi

	if [ -z "$D" ]; then
		systemctl daemon-reload
		systemctl preset lttng-sessiond.service

		if [ "disable" = "enable" ]; then
			systemctl --no-block restart lttng-sessiond.service
		fi
	fi
fi
if [ x"$D" = "x" ]; then
	if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
fi