Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
If you have Telnet installed on your DNS and have *never* activated the built-in UPnP server, please post the contents of the file /etc/upnpav.conf from your system in reply to this message.
Thanks in advance.
Offline
# # cat upnpav.conf
ShareFolder:/mnt
# #
Offline
The same here: The file has a size of 17 Byte and contains the following line:
ShareFolder:/mnt
This is what JOE told me.
Offline
# cat /etc/unpnpav.conf
ShareFolder:/mnt
# #
Offline
Hmm... must be something else that's kicking off UPnP server then.
Could you folks that replied do the same for /etc/rc.sh?
Thanks again.
Offline
The cron entry for dhcp kicks off the UPnP server.
Offline
frodo,
Please forgive my ignorance, how does /usr/sbin/getdhcp know whether or not to launch the UPnP server?
UPnP server does not run on a new DNS system until you enable it via the user interface. But once you do it cannot be disabled from the user interface. That is my experience. I am looking for a way to disable the UPnP server so it doesn't keep showing up on my network, especially since it doesn't work and I have Firefly installed.
BTW, I have tried to report this to D-Link, but that is another story...
Thanks.
Last edited by jmang (2007-08-15 09:26:59)
Offline
If you do a strings on the getdhcp binary you will find this:
check upnp
ps -aux | grep upnp > /tmp/upnpid
/tmp/upnpid
/upnp/upnp
/bin/upnpscript &
rm /tmp/upnpid
/sys/custom/default/sib.conf
And it is consistent with how my DNS-323 keeps popping up on my LAN. Each time the cronjob is run it will reappear.....
Offline
Ignore this post, didn't work.....
/Apan
Last edited by Apskaft (2007-08-15 18:21:11)
Offline
Do you think I could just delete the whole getdhcp line from the cron file? I am guessing that this code might be responsible for starting up the DHCP server, the UPnP server and the iTunes server. I am not using any of those.
Offline
Apan,
Is my last suggestion what you tried that didn't work?
Offline
jmang wrote:
Do you think I could just delete the whole getdhcp line from the cron file? I am guessing that this code might be responsible for starting up the DHCP server, the UPnP server and the iTunes server. I am not using any of those.
No, I think you need it so that your DHCH lease is renewed when it expires. However, I think you can remove the symlink named "upnpscript" in /bin . Try linking to busybox...
cd /bin rm upnpscript ln -s ../bin/busybox upnpscript
As this is lost on reboot you'll have to put this in your fun_plug.
/Apan
Offline
jmang wrote:
Apan,
Is my last suggestion what you tried that didn't work?
Nope, I tried changing the value of "CF-UPNPAVServ" in the configuration file /webs/sib.conf. Didn't work...
Offline
I guess you could remove the cron entry if you configure the box with a static IP.
Offline
Apan,
I noticed that UPnP is not a persistent daemon so it is probably crond that kicks off UPnP's periodically announcing itself. If I understand correctly, your suggestion is to redirect the link to busybox which should result in crond's calling upnpscript doing nothing.
However, I suspect that UPnP server will still announce when the DNS is rebooted because there is code in the init script /etc/rc.sh to relink to the ROM version of upnpscript and execute it before fun_plug runs. I don't see any way of preventing this without modifying rc.sh. Do you? I am reluctant to do this due to the possibility of "bricking" the DNS, as I don't think rc.sh is restored to a default state on reboot.
I'm still wondering if there is a less radical way to do this. Something that triggers UPnP to announce must be in an inactive state before UPnP is enabled for the first time, and it does not get undone when UPnP is disabled. I was hoping to find whatever that something is.
Thanks again.
BTW, it appears that the cron file is recreated when the DNS is rebooted, although I haven't found anything in rc.sh that does this directly. My router is set for DHCP leases never to expire, and I suspect that getdhcp controls the DNS's DHCP *server* that optionally configures it to act as a DHCP host, not its ability to get a dynamic IP address which should be built into its TCP/IP protocol stack.
Last edited by jmang (2007-08-15 23:02:08)
Offline
jmang wrote:
Apan,
I don't see any way of preventing this without modifying rc.sh. Do you? I am reluctant to do this due to the possibility of "bricking" the DNS, as I don't think rc.sh is restored to a default state on reboot.
What happens at boot is that rc.sh recreates a bunch of symlinks from RAM-disc into flash. What I suggest is only to remove the link in the RAM-disc during boot, using the fun_plug. You could also kill the upnp server in the fun_plug to make sure it's not started at boot.
The fun_plug should look something like this:
#!/bin/sh # # Remove sym-link in RAMdisc # rm /bin/upnpscript # # Recreate sym-link to a fake script, # most likely this step is not necesarry... # ln -s /bin/busybox /bin/upnpscript # # Kill any started instances of UPnP server # kill -9 `/bin/pidof upnp`
As long as you're only fooling around with files in RAMdisc, there is no risc bricking the unit.
The above fun_plug has not been tested since I don't have access to the unit right now. However, I've removed the sym-link and got rid of the UPnP server.
jmang wrote:
I noticed that UPnP is not a persistent daemon so it is probably crond that kicks off UPnP's periodically announcing itself. If I understand correctly, your suggestion is to redirect the link to busybox which should result in crond's calling upnpscript doing nothing.
Well, D-Link are doing interresting stuff all the time. Every time the upnpscript is executed, the UPnP deamon is killed and restarted. I guess they have some kind of memoryleak or something else as they are killing things serving users. I mean, what happens if you actually are using the UPnP server watching a movie and the server is rebooted?!? Ugly as hell, but most likely good for the over all stability of the unit - causing less calls to support.
I mean, which is worse:
Me: Hey, Mr support guy, the film stopped?!?
Support: Try again
Me: Works like a charm
Support: Ok, case closed
mumbles: Stupid User error
Me: I can no longer watch movies!!
Support: Thats odd, try to reboot
Me: That worked, how often do I have to reboot?
Support: Every now and then...
Me: Really - this is not acceptable, I require a fix or I show it in the microwave!!! RMA, RMA, RMA !!!
Support: OK, I'll open a case - check next firmware
mumbles: Shit, we have a real problem - management bonus will now drop and I'll get fired for this...
I've noticed this ugly behaviour in many of the applications on the unit.
I can understand that they do this for the non-stable open-source applications, such as mt-daapd 0.2.4, but not the closed source UPnP application. As this seems to be sourced from REDSonic - they should instead require a stable application from them...or maybe theyv'e bougt the sources.
And this my friends, is why we need the custom firmware in this unit....
/Apan
Offline
jmang wrote:
BTW, it appears that the cron file is recreated when the DNS is rebooted, although I haven't found anything in rc.sh that does this directly. My router is set for DHCP leases never to expire, and I suspect that getdhcp controls the DNS's DHCP *server* that optionally configures it to act as a DHCP host, not its ability to get a dynamic IP address which should be built into its TCP/IP protocol stack.
In linux there is no such thing "builtin" to the protocol stack. It always requires some kind of daemon.
On the DNS to save memory this daemon is not run all the time. Instead it is kicked off by cron.
So if you want to get rid of getdhcp you need to configure the box with a static IP.
A DHCP server needs to be running all the time and can not be invoked via cron so getdhcp is not related to this functionality.
Cheers
Frodo
Offline
I'm using 1.05 fw and funplug.
There is a serious problem in getdhcp. Using strings and strace show this program opens both /web/sib.conf and
/sys/custom/default/sib.conf. These contain the localized and the edfault parameters.
This program then execs a udhcpc (dhcp client) using the parameter:
/sbin/udhcpc -i %s -H %s -p /var/run/udhcpc.pid -s /usr/share/udhcpc/default.script -x %s -q -b&
Unfortunately it seems to take ALL of the dhcp client parameters from the default=firmware file, and ignores localization.
I get this:
/sbin/udhcpc -i egiga0 -H DNS-323 -p /var/run/udhcpc.pid -s /usr/share/udhcpc/default.script -x 192.168.0.32 -q -b
But my hostname ISN'T DNS-323 and 192.168.0.32 has no significance on my network.
==
The initial dhcp from the /etc/rc.d/rc.init.sh reads ....
/sbin/udhcpc -i egiga0 -H frown -p /var/run/udhcpc.pid -s /usr/share/udhcpc/default.script -x 192.168.0.32 -q -b
So my dns/dhcp server resolves the NAS name as "frown" for a while and aftersome time, crond runs getdhcp and then the DNS server ignores the name "frown" and starts using "DNS-323". This is a serious error.
===
BTW the /var/spool/cron/crontabs/root file seems to be written by the /web/webs program. No idea when it runs.
Offline