From 448068621cbec79a084941f96b7f3cf8d65b2805 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Mon, 19 Aug 2013 22:17:25 +0300 Subject: [PATCH 1/2] busybox: mount-filesystem: ensure that /storage/log is a directory --- packages/sysutils/busybox/init.d/01_mount-filesystem | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/sysutils/busybox/init.d/01_mount-filesystem b/packages/sysutils/busybox/init.d/01_mount-filesystem index 2808c45191..c99c9f666b 100644 --- a/packages/sysutils/busybox/init.d/01_mount-filesystem +++ b/packages/sysutils/busybox/init.d/01_mount-filesystem @@ -34,6 +34,7 @@ progress "mounting needed filesystems" mount -n -t debugfs debugfs /sys/kernel/debug if [ ! "$RUNLEVEL" = "installer" -a "$DEBUG" = "yes" ]; then + [ ! -d $HOME/log ] && rm -rf $HOME/log &>/dev/null mkdir -p $HOME/log ln -sf $HOME/log /var/log else From 5abdd364ba27ce69a9af09cb78db4cb8f6ee24ce Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Mon, 19 Aug 2013 22:22:18 +0300 Subject: [PATCH 2/2] avahi: run as daemon, enable optional debug, remove startup hacks --- packages/network/avahi/init.d/53_avahi | 29 ++++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/packages/network/avahi/init.d/53_avahi b/packages/network/avahi/init.d/53_avahi index 6144abbcc1..fea84f3150 100644 --- a/packages/network/avahi/init.d/53_avahi +++ b/packages/network/avahi/init.d/53_avahi @@ -27,23 +27,20 @@ # ensure that environment is sane . /etc/profile - # wait for network - wait_for_inet_addr force - progress "Starting Avahi Daemon" + if [ "$DEBUG" = "yes" ]; then + AVAHI_DEBUG="--debug" + fi + mkdir -p /var/run/avahi-daemon - while true; do - AVAHI_ENABLED=true - if [ -f $CONFIG_CACHE/services/avahi.conf ]; then - . $CONFIG_CACHE/services/avahi.conf - fi - if [ "$AVAHI_ENABLED" == "true" ]; then - wait_for_dbus - avahi-daemon --syslog > /dev/null 2>&1 - else - break - fi - usleep 2000000 - done + AVAHI_ENABLED=true + if [ -f $CONFIG_CACHE/services/avahi.conf ]; then + . $CONFIG_CACHE/services/avahi.conf + fi + if [ "$AVAHI_ENABLED" == "true" ]; then + wait_for_dbus + rm /var/run/avahi-daemon/pid &>/dev/null + avahi-daemon $AVAHI_DEBUG -D --syslog > /dev/null 2>&1 + fi )&