� oB�]c@s,dZddlZddlZddlmZddlmZddlmZeje �Z dZ dZ dZ e e fZd �Zd �Zddd �Zdd �Zdd �Ze dkr(ddlZe�Zejdejd�Zee edejjd��Zer(eje�q(ndS(s-Run the dhclient hook to record network info.i����N(t atomic_helper(tlog(tstagess dhclient-hooktuptdowncCs(tj�}tjj|jj�d�S(Nsdhclient.hooks(RtInittostpathtjointpathst get_runpath(ti((s;/usr/lib/python2.7/site-packages/cloudinit/dhclient_hook.pyt_get_hooks_dirs cCsvi}xi|j�D][\}}|jd�s=|jd�r|jdd�jdd�j�}|||s.