# create avahi state directory mkdir -p /var/lib [ add = "$ACTION" ] && { [ -n "$INTERFACE" ] && { [ "$DEVTYPE" = "bridge" ] && INTERFACE=${INTERFACE#br-} AUTOIP_OPT=$(uci -q get network.${INTERFACE}.autoip) [ "${AUTOIP_OPT}" = "yes" ] && { avahi-autoipd -s -D ${DEVICENAME} } } } [ remove = "$ACTION" ] && { [ -n "$INTERFACE" ] && { # no use in checking the config, it is gone avahi-autoipd -s -k ${DEVICENAME} } }