- hpvd-Add-support-for-patching-hyperv-daemons.patch [RHEL-40107 RHEL-40679] - hpvd-Do-not-set-NM_CONTROLLED-no.patch [RHEL-40107 RHEL-40679] - hpvd-Add-vmbus_testing-tool-build-files.patch [RHEL-40107 RHEL-40679] - hpvd-hv_set_ifconfig.sh-Use-nmcli-commands.patch [RHEL-40107 RHEL-40679] - hpvd-Use-filename-for-connection-profile.patch [RHEL-40107 RHEL-40679] - hpvd-redhat-hv_set_if_config-Workaround-for-gateway-numbe.patch [RHEL-40107 RHEL-40679] - hpvd-tools-hv-Remove-an-extraneous-the.patch [RHEL-40107 RHEL-40679] - hpvd-tools-hv-kvp-remove-unnecessary-void-conversions.patch [RHEL-40107 RHEL-40679] - hpvd-vmbus_testing-fix-wrong-python-syntax-for-integer-va.patch [RHEL-40107 RHEL-40679] - hpvd-hv-hv_kvp_daemon-Support-for-keyfile-based-connectio.patch [RHEL-40107 RHEL-40679] - hpvd-hv-hv_kvp_daemon-Some-small-fixes-for-handling-NM-ke.patch [RHEL-40107 RHEL-40679] - hpvd-hv-hv_kvp_daemon-Handle-IPv4-and-Ipv6-combination-fo.patch [RHEL-40107 RHEL-40679] - hpvd-Changes-for-adding-keyfile-support-in-RHEL-specific-.patch [RHEL-40107 RHEL-40679] - hpvd-Remove-hyperv_fcopy_daemon-as-the-c10s-kernel-does-n.patch [RHEL-40107 RHEL-40679] - Resolves: RHEL-40107 ([Hyper-V][RHEL10] Request to update hypervkvpd related file /usr/libexec/hypervkvpd/hv_set_ifconfig same as RHEL 9.5 hv_set_ifconfig file.) - Resolves: RHEL-40679 ([Hyper-V][RHEL10] Request to update hyperv-daemons vmbus_testing, hv_kvp_daemon.c, hv_vss_daemon.c files as same as RHEL 9.5)
42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From 5b1094b6e8d7b5314ff32cef741e22bf2904d81f Mon Sep 17 00:00:00 2001
|
|
From: Till Maas <timaas@redhat.com>
|
|
Date: Mon, 13 Dec 2021 16:08:42 +0000
|
|
Subject: [PATCH 04/14] hv_set_ifconfig.sh: Use nmcli commands
|
|
|
|
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-MergeRequest: 9: Synchronize RHEL 9 changes to RHEL 10
|
|
RH-Jira: RHEL-40107 RHEL-40679
|
|
RH-Acked-by: Ani Sinha <anisinha@redhat.com>
|
|
RH-Commit: [4/14] 657c30ec2f7f3cf90cd0950e45b2441280ef2581 (mrezanin/centos-git-hyperv-daemons)
|
|
|
|
Instead of using deprecated ifup/ifdown commands, use nmcli commands.
|
|
Taking the connection down is not necessary with NM, so don't do it.
|
|
|
|
Resolves: #2026371
|
|
|
|
patch_name: hpvd-hv_set_ifconfig.sh-Use-nmcli-commands.patch
|
|
present_in_specfile: true
|
|
location_in_specfile: 7
|
|
---
|
|
hv_set_ifconfig.sh | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/hv_set_ifconfig.sh b/hv_set_ifconfig.sh
|
|
index 3dd064c..5a64efe 100644
|
|
--- a/hv_set_ifconfig.sh
|
|
+++ b/hv_set_ifconfig.sh
|
|
@@ -57,8 +57,5 @@ echo "ONBOOT=yes" >> $1
|
|
|
|
cp $1 /etc/sysconfig/network-scripts/
|
|
|
|
-
|
|
-interface=$(echo $1 | awk -F - '{ print $2 }')
|
|
-
|
|
-/sbin/ifdown $interface 2>/dev/null
|
|
-/sbin/ifup $interface 2>/dev/null
|
|
+nmcli connection load "/etc/sysconfig/network-scripts/$1"
|
|
+nmcli connection up filename "/etc/sysconfig/network-scripts/$1"
|
|
--
|
|
2.39.3
|
|
|