[Ovirt-devel] [PATCH ovirt-node] configure_ovirt_management_nic: dhclient cleanup

Alan Pevec apevec at redhat.com
Thu Jul 15 13:28:20 UTC 2010


kill dhclient immediatelly after getting the address to avoid
conflict with network restart later when configuration is applied

Signed-off-by: Alan Pevec <apevec at redhat.com>
---
 scripts/ovirt-early |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/scripts/ovirt-early b/scripts/ovirt-early
index 4e114b5..6dc8bee 100755
--- a/scripts/ovirt-early
+++ b/scripts/ovirt-early
@@ -42,7 +42,9 @@ configure_ovirt_management_nic() {
         if ! network_up ; then
             log "Using interface $DEVICE"
             # setup temporary interface to retrieve configuration
-            /sbin/dhclient $1
+            /sbin/dhclient -1 $1 \
+             && [ -f /var/run/dhclient.pid ] \
+             && kill $(cat /var/run/dhclient.pid)
         fi
         if [ $? -eq 0 ]; then
             # from network-scripts/ifup-post
-- 
1.7.1.1




More information about the ovirt-devel mailing list