[Bug 580319] Re: dhcp3-server launches before upstart brings all interface, thus failing to start

Ulrik Hørlyk Hjort ulrik.hoerlyk.hjort at gmail.com
Wed Jun 30 14:44:52 BST 2010


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")

-- 
dhcp3-server launches before upstart brings all interface, thus failing to start
https://bugs.launchpad.net/bugs/580319
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dhcp3 in ubuntu.



More information about the Ubuntu-server-bugs mailing list