aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cortexa57-poky-linux/glibc/nscd/latest.pkg_postinst
blob: 3dc856d0d32cff90a0137259835744581f1fe7e1 (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
28
29
30
set -e
	if [ -z "$D" ]; then
		if command -v systemd-tmpfiles >/dev/null; then
			systemd-tmpfiles --create /etc/tmpfiles.d/nscd.conf
		elif [ -e /etc/init.d/populate-volatile.sh ]; then
			/etc/init.d/populate-volatile.sh update
		fi
	fi
if systemctl >/dev/null 2>/dev/null; then
	OPTS=""

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

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

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

		if [ "enable" = "enable" ]; then
			systemctl --no-block restart nscd.service
		fi
	fi
fi