Comment 8 for bug 212441

Revision history for this message
Richard Bailey (rmjb) wrote :

Unfortunately the workaround proposed in the mediatomb faq no longer works on Jaunty as detailed by comment #4.

I also tried setting eth0 in the interface file and tried removing network manager and tried moving mediatomb to start after NetworkManager in rc2 (the apparent default runlevel) but none of those worked.
I also tried a script with a sleep of 60 seconds then it would restart mediatomb and that also didn't work.

I wanted to emulate the behaviour of the ntp daemon which seems to start with the network. On further investigation I found the directories if-up.d and if-down.d in /etc/network which contain scripts that run when the network comes up and goes down respectively.

Emulating a line from the ntp script I created two scripts for mediatomb. The one in if-up.d executes:

invoke-rc.d mediatomb restart

and in if-down.d it executes:

invoke-rc.d mediatomb stop

After I rebooted my machine mediatomb now starts up automatically with the network.

I'm attaching a tar archive with the two scripts, you can cd to /etc/network and untar the archive there.

Last thing, the links in the rcX directories are now pointless so I removed mine by executing:

sudo update-rc.d -f mediatomb remove

And finally, you can always check /var/log/mediatomb.log for details on if mediatomb is running.