From patchwork Mon Jul 20 08:53:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 11673229 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37393138C for ; Mon, 20 Jul 2020 08:53:37 +0000 (UTC) Received: from bastion.fedoraproject.org (bastion-iad01.fedoraproject.org [38.145.60.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 06AA72080D for ; Mon, 20 Jul 2020 08:53:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06AA72080D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=libteam-bounces@lists.fedorahosted.org Received: from mailman01.iad2.fedoraproject.org (mailman01.iad2.fedoraproject.org [10.3.163.57]) by bastion01.iad2.fedoraproject.org (Postfix) with ESMTP id 525A730B641E; Mon, 20 Jul 2020 08:53:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 bastion01.iad2.fedoraproject.org 525A730B641E Received: from mailman01.iad2.fedoraproject.org (localhost [IPv6:::1]) by mailman01.iad2.fedoraproject.org (Postfix) with ESMTP id 5112C5E89DABD; Mon, 20 Jul 2020 08:53:36 +0000 (UTC) Received: by mailman01.iad2.fedoraproject.org (Postfix, from userid 991) id 546CF5E89DAD7; Mon, 20 Jul 2020 08:53:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mailman01.iad2.fedoraproject.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=disabled version=3.4.0 Received: from smtp-mm-osuosl01.fedoraproject.org (smtp-mm-osuosl01.vpn.fedoraproject.org [192.168.1.23]) by mailman01.iad2.fedoraproject.org (Postfix) with ESMTP id 0E6715E89DAC9 for ; Mon, 20 Jul 2020 08:53:34 +0000 (UTC) Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by smtp-mm-osuosl01.fedoraproject.org (Postfix) with ESMTPS id AD11198062 for ; Mon, 20 Jul 2020 08:53:33 +0000 (UTC) Received: by mail-pj1-x1041.google.com with SMTP id md7so9764527pjb.1 for ; Mon, 20 Jul 2020 01:53:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=j3OnMfknTOEYH6eOz5SZtO/DvgaOcarB61Yhh8Um2zc=; b=nYVZHQDH90ivCiLBVITLoy4JrMosz5yYPdYtbpMDfuiKWFwE3JQX28mAwHSQ8azVVs 1+pIadqYgwfHc+4l/i7KTbLx4+NdbXcd1SlW3uTQXGeB5ojndgFrSY7KVIn8smbp+j9o JIvo4jvhyteFkiXBlTPGdfZKQ6aqCfFyUugAoXAMSO2QzDAszD+aNi7KEn1kdShlFe69 DRoQnB7zj/pdFQmttUrDPXLYoAJ0U0CIyhwp6WBv/573223h2SYNBIhhCyNpVZ+UjjpO H4o0seSHiuD1wzinFMn9YJ6SKiWVhsDaUhJgcrScDxHDsOapG4OxIvGB4LHE+IFR7syn 4GzA== X-Gm-Message-State: AOAM533rWwc++VhtvVz5xiPdoVUtu/EG5NEB5VcAEUGSFduqyyNw4lIH mP2wnlCsR759mlVDd36XhPbEd2kAZqdiBw== X-Google-Smtp-Source: ABdhPJy7IODSWHeNq36G5WD0hkOxnnOF2zjr6Fv29gWZ2sLaMNTyqU7pa5zrecIN17KwB2Jzeekj7Q== X-Received: by 2002:a17:902:d311:: with SMTP id b17mr16964221plc.223.1595235213047; Mon, 20 Jul 2020 01:53:33 -0700 (PDT) Received: from dhcp-12-153.nay.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id az16sm11165195pjb.7.2020.07.20.01.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 01:53:32 -0700 (PDT) From: Hangbin Liu To: libteam@lists.fedorahosted.org Subject: [PATCH libteam] utils/bond2team: remove TYPE in ifcfg file Date: Mon, 20 Jul 2020 16:53:21 +0800 Message-Id: <20200720085321.2107880-1-liuhangbin@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Message-ID-Hash: MTJXEZAOBPBB7JP2AMCBTF4YHV7ASMRC X-Message-ID-Hash: MTJXEZAOBPBB7JP2AMCBTF4YHV7ASMRC X-MailFrom: liuhangbin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Jiri Pirko , Hangbin Liu X-Mailman-Version: 3.1.1 Precedence: list List-Id: Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: When convert Bond config to Team, TYPE is used for Bond and DEVICETYPE is used for Team. So we should remove TYPE keyword in ifcfg file. Before the fix: $ ls bonding/ ifcfg-bond0 ifcfg-bond0-eth1 ifcfg-bond0-eth2 $ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE TYPE=Bond DEVICETYPE="Team" TYPE=Ethernet DEVICETYPE="TeamPort" TYPE=Ethernet DEVICETYPE="TeamPort" Afther the fix: $ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE DEVICETYPE="Team" DEVICETYPE="TeamPort" DEVICETYPE="TeamPort" Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool") Signed-off-by: Hangbin Liu --- utils/bond2team | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/bond2team b/utils/bond2team index 28733da..2aae3f5 100755 --- a/utils/bond2team +++ b/utils/bond2team @@ -331,7 +331,7 @@ vfile_load_ifcfg() oIFS="$IFS" IFS=$'\n' VFILE=( $(LANG=C \ - grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|DEVICETYPE\|TEAM' \ + grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|TYPE\|DEVICETYPE\|TEAM' \ $ifcfg )) IFS="$oIFS" }