diff options
Diffstat (limited to 'packages/cortexa57-poky-linux/rng-tools/rng-tools/latest.pkg_postinst')
-rw-r--r-- | packages/cortexa57-poky-linux/rng-tools/rng-tools/latest.pkg_postinst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/cortexa57-poky-linux/rng-tools/rng-tools/latest.pkg_postinst b/packages/cortexa57-poky-linux/rng-tools/rng-tools/latest.pkg_postinst new file mode 100644 index 000000000000..b375476fd711 --- /dev/null +++ b/packages/cortexa57-poky-linux/rng-tools/rng-tools/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 rng-tools.service; do + systemctl ${OPTS} enable "$service" + done + fi + + if [ -z "$D" ]; then + systemctl daemon-reload + systemctl preset rng-tools.service + + if [ "enable" = "enable" ]; then + systemctl --no-block restart rng-tools.service + fi + fi +fi |