From 16ebc0e55e84a19cec8a59b7370c901ba585b483 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Sun, 24 Apr 2011 13:34:15 +0200 Subject: [PATCH] [luci] stop the avahi-daemon in luci-reload to free up precious memory --- .../package/luci/libs/uci/root/sbin/luci-reload | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mote/v2/openwrt/package/luci/libs/uci/root/sbin/luci-reload b/mote/v2/openwrt/package/luci/libs/uci/root/sbin/luci-reload index 24cf760..0a6d2cf 100755 --- a/mote/v2/openwrt/package/luci/libs/uci/root/sbin/luci-reload +++ b/mote/v2/openwrt/package/luci/libs/uci/root/sbin/luci-reload @@ -28,7 +28,20 @@ reload_init() { } } +avahi_stop() { + [ -s /var/run/avahi-daemon/pid ] && { + AVAHI=1 + /etc/init.d/avahi-daemon stop + } +} + +avahi_start() { + [ -n $AVAHI ] && /etc/init.d/avahi-daemon start +} + + lock "/var/run/luci-reload" +avahi_stop config_load ucitrack @@ -36,5 +49,6 @@ for i in $*; do config_foreach apply_config $i $i done +avahi_start rm -f "/var/run/luci-reload-status" lock -u "/var/run/luci-reload"