From 9e79a9f1ef4d90a466ae752f389489cec38e0495 Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Tue, 6 Dec 2016 22:13:35 +0100 Subject: [PATCH] fix indentation, quotes, stderr --- .../files/etc/hotplug.d/iface/10-gluon-respondd | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/gluon-respondd/files/etc/hotplug.d/iface/10-gluon-respondd b/package/gluon-respondd/files/etc/hotplug.d/iface/10-gluon-respondd index 99a146da..42459785 100644 --- a/package/gluon-respondd/files/etc/hotplug.d/iface/10-gluon-respondd +++ b/package/gluon-respondd/files/etc/hotplug.d/iface/10-gluon-respondd @@ -2,17 +2,15 @@ . /lib/functions/service.sh -DEVLIST=/var/run/gluon-respondd.devs - ifname_to_dev () { - ifstatus client "$1"|jsonfilter -e "@.device" + ifstatus client "$1"|jsonfilter -e "@.device" } case "$ACTION" in - ifup) - DEVICE="$(ifname_to_dev "$INTERFACE")" + ifup) + DEVICE="$(ifname_to_dev "$INTERFACE")" - [ "$DEVICE" != "$(cat /lib/gluon/respondd/client.dev)" ] || - /etc/init.d/gluon-respondd restart_if_running & - ;; + [ "$DEVICE" != "$(cat /lib/gluon/respondd/client.dev 2>/dev/null)" ] || + /etc/init.d/gluon-respondd restart_if_running & + ;; esac