[Ovirt-devel] [PATCH node] Kill persistent dhclient on the temporary interface
Alan Pevec
apevec at gmail.com
Tue Jul 13 15:55:10 UTC 2010
On Tue, Jul 13, 2010 at 5:27 PM, Arthur Clement <aclement at linagora.com> wrote:
>
> Signed-off-by: Arthur Clement <aclement at linagora.com>
> ---
> scripts/ovirt-early | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/ovirt-early b/scripts/ovirt-early
> index 1c15792..6b510ca 100755
> --- a/scripts/ovirt-early
> +++ b/scripts/ovirt-early
> @@ -43,6 +43,9 @@ configure_ovirt_management_nic() {
> log "Using interface $DEVICE"
> # setup temporary interface to retrieve configuration
> /sbin/dhclient $1
nack, instead of saving PID and killing it, we could simply:
- /sbin/dhclient $1
+ /sbin/dhclient -1 $1
then there wouldn't be dhclient left running.
> + # save dhclient PID for killing it later
> + dhclientPid=$( /sbin/pidof dhclient )
> +
> fi
> if [ $? -eq 0 ]; then
> # from network-scripts/ifup-post
> @@ -97,7 +100,9 @@ configure_ovirt_management_nic() {
> log "Default config applied"
> fi
>
> - service network restart
> + service network stop
> + /bin/kill -9 $dhclientPid
> + service network start
>
> }
More information about the ovirt-devel
mailing list