D-Link Forums
The Graveyard - Products No Longer Supported => DNS-323 => D-Link Storage => Beta code! => Topic started by: thebeck on March 04, 2011, 11:15:16 AM
-
Hi D-Link
Follow up to this forum thread: http://forums.dlink.com/index.php?topic=6405.0 (http://forums.dlink.com/index.php?topic=6405.0)
I have been playing around with the now built-in bonjour service, which is still the old howl implementation (/usr/sbin/mDNSResponsder -v gives version 1.0.0 from the year 2005). While the howl implementation has several issues (see http://forums.dlink.com/index.php?topic=6405.0 (http://forums.dlink.com/index.php?topic=6405.0)), the one benefit of it being an add-on is that additional services can be added (e.g., afp via ffp netatalk) to the mDNSResponder.conf file. Now that it is built-in, the mDNSResponder.conf file is in flash and reset on each reboot.
So, couple all the issues from http://forums.dlink.com/index.php?topic=6405.0 (http://forums.dlink.com/index.php?topic=6405.0) (I won't repeat them all here) with the fact that I can no longer extend the services offered means I will have to write a fun_plug just to "kill" the mDNSResponder so that I can run a much more stable zeroconfig implementation (i.e., avahi).
Since I did not see it in the admin UI, can you please add an admin configuration to let users "turn off" the built-in bonjour service just like UPnP, FTP, iTunes and others?
-
Not being able to turn this service off is probably not a good idea. I have no use for it, and would rather use the oh-so-precious RAM is uses for other things.
-
+1, please make this configurable.
-
Hi D-Link Multimedia moderator,
Any chance you make the bonjour support configurable via the admin user interface?
Specifically, the ability to enable/disable.
-
Hi D-Link Multimedia moderator,
Any chance you make the bonjour support configurable via the admin user interface?
Specifically, the ability to enable/disable.
A user configurable option will not be implemented in 1.10.
-
A user configurable option will not be implemented in 1.10.
Bad call, imho. Can you, at least, provide a method to turn it off from a fun-plug?
-
Bad call, imho. Can you, at least, provide a method to turn it off from a fun-plug?
There is plenty of information on how to do that on the other forum.
-
Echoing scaramanga's sentiments...
I think it is pretty sad that D-Link is using an extremely old zeroconf solution knowing full well (a) it is unsupported by the author, (b) there is an open source solution that is awesome (i.e., avahi) and kept up to date, and (c) Apple's own implementation of bonjour has seen many updates since 2005, which is the last time Porchdog made any real updates to their howl implementation.
In any event, when you start avahi via ffp using a shell script in the start directory, you will need to do something like the following (look for the kill statement inside the start function):
#!/ffp/bin/sh
# PROVIDE:
# REQUIRE:
# BEFORE:
. /ffp/etc/ffp.subr
name="avahi-daemon"
start_cmd="avahid_start"
stop_cmd="avahid_stop"
status_cmd="avahid_status"
avahid_check_user_group()
{
export GROUP_CHK=`cat /etc/group | grep avahi`
if [ "${GROUP_CHK}" = "" ]; then
groupadd avahi -g 1000
export GROUP_ADD="true"
else
export GROUP_ADD="false"
fi
export USER_CHK=`cat /etc/passwd | grep avahi`
if [ "${USER_CHK}" = "" ]; then
adduser -S -G avahi -D -H avahi
export USER_ADD="true"
else
export USER_ADD="false"
fi
if [ "${GROUP_ADD}" = "true" -o "${USER_ADD}" = "true" ]; then
/ffp/sbin/store-passwd.sh
fi
}
avahid_start()
{
avahid_check_user_group
kill -9 `pidof mDNSResponder`
export AVAHID_CHK=`ps -ef | grep avahi | grep -v grep | grep -v start`
if [ "${AVAHID_CHK}" = "" ]; then
if [ -f /ffp/var/run/avahi-daemon/pid ]; then
rm -f /ffp/var/run/avahi-daemon/pid
fi
fi
if [ -e /ffp/sbin/avahi-daemon ]; then
/ffp/sbin/avahi-daemon -V
/ffp/sbin/avahi-daemon -c
if [ "$?" -ne "0" ]; then
if [ -f /ffp/var/run/avahi-daemon/pid ]; then
rm -f /ffp/var/run/avahi-daemon/pid
fi
echo "Starting..."
/ffp/sbin/avahi-daemon -f /ffp/etc/avahi/avahi-daemon.conf -D
else
echo "Already Running"
fi
else
echo "No Binary"
fi
}
avahid_stop()
{
export AVAHID_CHK=`ps -ef | grep avahi | grep -v grep | grep -v stop`
if [ "${AVAHID_CHK}" = "" ]; then
if [ -f /ffp/var/run/avahi-daemon/pid ]; then
rm -f /ffp/var/run/avahi-daemon/pid
fi
fi
if [ -e /ffp/sbin/avahi-daemon ]; then
/ffp/sbin/avahi-daemon -V
/ffp/sbin/avahi-daemon -c
if [ "$?" -ne "0" ]; then
echo "Not Running"
else
echo "Stopping..."
/ffp/sbin/avahi-daemon -k
fi
else
echo "No Binary"
fi
if [ -f /ffp/var/run/avahi-daemon/pid ]; then
rm -f /ffp/var/run/avahi-daemon/pid
fi
}
avahid_status()
{
export AVAHID_CHK=`ps -ef | grep avahi | grep -v grep | grep -v status`
if [ "${AVAHID_CHK}" = "" ]; then
if [ -f /ffp/var/run/avahi-daemon/pid ]; then
rm -f /ffp/var/run/avahi-daemon/pid
fi
fi
if [ -e /ffp/sbin/avahi-daemon ]; then
/ffp/sbin/avahi-daemon -V
/ffp/sbin/avahi-daemon -c
if [ "$?" -ne "0" ]; then
echo "Not Running"
if [ -f /ffp/var/run/avahi-daemon/pid ]; then
rm -f /ffp/var/run/avahi-daemon/pid
fi
else
echo "Running"
fi
else
echo "No Binary"
fi
}
run_rc_command "$1"
Note: I suppose I could use the pidof technique in other places in the shell script (instead of the multiple grep statements), but you get the idea.
-
Just to be clear, we would prefer to use Avahi however there is no flash space for avahi at this time.
-
Great!!!
What about providing avahi as an add-on, instead?
Prior to 1.10, your zeroconf solution was an add-on, so perhaps you can shed some light as to why the move to providing zeroconf in the firmware?
I would bet there are others who would like to see a move to a newer linux kernel, upgraded busybox (1.18.4 vs. pre-1.0), upgraded samba (3.5.8 vs. 3.0.24) or other features rather than providing zeroconf built in.
Looking forward to your thoughts.