diff options
Diffstat (limited to 'packages/cortexa57-poky-linux/glibc/nscd/latest.pkg_postinst')
-rw-r--r-- | packages/cortexa57-poky-linux/glibc/nscd/latest.pkg_postinst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/cortexa57-poky-linux/glibc/nscd/latest.pkg_postinst b/packages/cortexa57-poky-linux/glibc/nscd/latest.pkg_postinst new file mode 100644 index 00000000000..3dc856d0d32 --- /dev/null +++ b/packages/cortexa57-poky-linux/glibc/nscd/latest.pkg_postinst @@ -0,0 +1,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 |