Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, on fedora

Well, on fedora 19 the other solutions didn't work for me (well I didn't try the one that delays all services just for that... I only want to delay minidlna because it's the only problematic service), so i gave up and went for the ugly-but-it-works solution.

I wrote this script:

#!/usr/bin/sh
ip_row=`ifconfig | grep 192`
while [ ! -n "$ip_row" ]
do
  ip_row=`ifconfig | grep 192`
  sleep 2
done

# OK now there an IP...
/usr/sbin/minidlna -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid

I know my IP is going to be 192.*, so I relied on that. Once ifconfig returns at least one row containing "192" i know I have an IP. So I make a loop and once I have an IP then I launch minidlna. Works for me.

Remember to give exe rights to that script (chmod 755), and you can debug any problems by checking in /var/log/messages and by running the very helpful "systemctl status" command.

Well, on fedora 19 the other solutions didn't work for me (well I didn't try the one that delays all services just for that... I only want to delay minidlna because it's the only problematic service), so i gave up and went for the ugly-but-it-works solution.

I wrote this script:

#!/usr/bin/sh
ip_row=`ifconfig | grep 192`
while [ ! -n "$ip_row" ]
do
  ip_row=`ifconfig | grep 192`
  sleep 2
done

# OK now there an IP...
/usr/sbin/minidlna -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid

I know my IP is going to be 192.*, so I relied on that. Once ifconfig returns at least one row containing "192" i know I have an IP. So I make a loop and once I have an IP then I launch minidlna. Works for me.

So then in /usr/lib/systemd/system/minidlna.service I changed the ExecStart row to start this script instead of starting minidlna directly.

Remember to give exe rights to that script (chmod 755), and you can debug any problems by checking in /var/log/messages and by running the very helpful "systemctl status" command.

Well, on fedora 19 the other solutions didn't work for me (well I didn't try the one that delays all services just for that... I only want to delay minidlna because it's the only problematic service), so i gave up and went for the ugly-but-it-works solution.

I wrote this script:

#!/usr/bin/sh
ip_row=`ifconfig | grep 192`
while [ ! -n "$ip_row" ]
do
  ip_row=`ifconfig | grep 192`
  sleep 2
done

# OK now there an IP...
/usr/sbin/minidlna -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid

I know my IP is going to be 192.*, so I relied on that. Once ifconfig returns at least one row containing "192" i know I have an IP. So I make a loop and once I have an IP then I launch minidlna. Works for me.

So then in /usr/lib/systemd/system/minidlna.service /usr/lib/systemd/system/minidlna.service I changed the ExecStart row to start this script instead of starting minidlna directly.

Remember to give exe rights to that script (chmod 755), (chmod 755), and you can debug any problems by checking in /var/log/messages /var/log/messages and by running the very helpful "systemctl status" systemctl status command.