On 03/16/2012 12:08 AM, Phil Dibowitz wrote:
> On 03/14/2012 08:27 PM, Scott Talbert wrote:
>> On Mon, 12 Mar 2012, Adam Williamson wrote:
>>
>>> Have you guys looked at how other projects achieve similar goals? Not
>>> the same, but similar...the one that occurred to me is how
>>> virt-manager / libvirt handle it, since they need the host system to act
>>> as a DHCP server for guest systems. I believe libvirt uses dnsmasq for
>>> this. It occurs to me that dd-wrt also uses dnsmasq. So it seems like
>>> maybe that's a good candidate to use when you need a plug-in DHCP server
>>> like this.
>>
>> Okay, I've come up with a proposed solution for the DHCP issue that I'm 
>> reasonably happy with.  It consists of the following:
> 
> I like this a lot! Really elegant!
> 
> A few minor things.
> 
>   NM_STATUS=`nmcli -t -f RUNNING nm`

Oh. You should change this... for example, I don't run network manager on my
desktop. I only run it places where I have wifi. Something like:

has_nm_running() {
  IS_RUNNING=0
  if [ -x '/usr/bin/nmcli' ] ; then
    NM_STATUS=$(nmcli -t -f RUNNING nm)
    if [ "$NM_STATUS" = "running" ]; then
      IS_RUNNING=1
    fi
  fi
}

if [ "$ACTION" = "add" ]; then
  USE_NM=$(has_nm_running)
  if [ "$USE_NM" -eq 1 ]; then
    ..


-- 
Phil Dibowitz                             p...@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to