[PATCH rhel6-branch] Disconnect active slaves before activating bond (#662007)
Vratislav Podzimek
vpodzime at redhat.com
Mon Jan 21 11:52:43 UTC 2013
On Mon, 2013-01-21 at 10:43 +0100, Radek Vykydal wrote:
> Related: rhbz#662007
> ---
> loader/net.c | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/loader/net.c b/loader/net.c
> index 15a7fe0..93a9c6f 100644
> --- a/loader/net.c
> +++ b/loader/net.c
> @@ -2313,6 +2313,26 @@ int activateDevice(struct loaderData_s * loaderData, iface_t * iface) {
> }
> }
>
> + if (loaderData->bonding_slaves) {
> + gchar **slaves = NULL;
> + int i;
> +
> + if ((slaves = g_strsplit(loaderData->bonding_slaves, ",", 0)) != NULL) {
> + for (i=0; i < g_strv_length(slaves); i++) {
> + if (slaves[i] != NULL && g_strcmp0(slaves[i], "")) {
> + if (is_iface_activated(slaves[i])) {
> + logMessage(INFO, "bond slave device %s is already activated", slaves[i]);
> + if ((rc = disconnectDevice(slaves[i])) != 0) {
> + logMessage(ERROR, "device disconnection failed with return code %d", rc);
> + }
> + }
> + }
> + }
> + g_strfreev(slaves);
> + }
> + }
> +
> +
> /* we don't want to end up asking about interface more than once
> * if we're in a kickstart-ish case (#100724) */
> loaderData->netDev_set = 1;
ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list