Comment 3 for bug 580319

Revision history for this message
Ulrik Hørlyk Hjort (ulrik-hoerlyk-hjort) wrote : Re: dhcp3-server launches before upstart brings all interface, thus failing to start

I made the following (hmm ... ugly ) workaround on my system until an update for dhcp3 is available:

Install a service for following python script in init.d. The script will spin until the bridge interface is up and running (looking for the routing table) and will the start the dhcp server. Remember to change your bridge interface name in the line:

      find_res = res.find("dev br0")

if it is different from dr0

/Ulrik

========================================================================
#!/usr/bin/python

import os
import subprocess

cmd = "ip route ls"

find_res = -1

while find_res == -1:

      p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)

      fin, fout = p.stdin, p.stdout

      res = fout.read()

      find_res = res.find("dev br0")

      time.sleep(1)

os.system("/etc/init.d/dhcp3-server start")