aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cortexa57-poky-linux/avahi/avahi-daemon/latest.pkg_postinst
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cortexa57-poky-linux/avahi/avahi-daemon/latest.pkg_postinst')
-rw-r--r--packages/cortexa57-poky-linux/avahi/avahi-daemon/latest.pkg_postinst26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/cortexa57-poky-linux/avahi/avahi-daemon/latest.pkg_postinst b/packages/cortexa57-poky-linux/avahi/avahi-daemon/latest.pkg_postinst
new file mode 100644
index 000000000000..c3f64add17f1
--- /dev/null
+++ b/packages/cortexa57-poky-linux/avahi/avahi-daemon/latest.pkg_postinst
@@ -0,0 +1,26 @@
+set -e
+if [ -z "$D" ]; then
+ killall -q -HUP dbus-daemon || true
+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 avahi-daemon.service; do
+ systemctl ${OPTS} enable "$service"
+ done
+ fi
+
+ if [ -z "$D" ]; then
+ systemctl daemon-reload
+ systemctl preset avahi-daemon.service
+
+ if [ "enable" = "enable" ]; then
+ systemctl --no-block restart avahi-daemon.service
+ fi
+ fi
+fi