- 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)
69 lines
2.3 KiB
Diff
69 lines
2.3 KiB
Diff
From 935df801defcb3f459891e180e66065030d11612 Mon Sep 17 00:00:00 2001
|
|
From: Ani Sinha <anisinha@redhat.com>
|
|
Date: Tue, 10 Oct 2023 11:50:30 +0530
|
|
Subject: [PATCH 13/14] Changes for adding keyfile support in RHEL specific
|
|
script
|
|
|
|
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: [13/14] 0dec80310c49a5ccbc6b030ba6c575046b21b60f (mrezanin/centos-git-hyperv-daemons)
|
|
|
|
Some adjustments to the RHEL specific customization script in order to support
|
|
Network Manager keyfiles. These changes were tested internally by Red Hat QE.
|
|
These changes are mostly trivial and are not pushed upstream at this momemnt.
|
|
|
|
See also https://issues.redhat.com/browse/RHEL-14505
|
|
|
|
Signed-off-by: Ani Sinha <anisinha@redhat.com>
|
|
|
|
patch_name: hpvd-Changes-for-adding-keyfile-support-in-RHEL-specific-.patch
|
|
present_in_specfile: true
|
|
location_in_specfile: 16
|
|
---
|
|
hv_set_ifconfig.sh | 25 ++++++++++++++-----------
|
|
1 file changed, 14 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/hv_set_ifconfig.sh b/hv_set_ifconfig.sh
|
|
index 9c2ee30..0bdf2bc 100644
|
|
--- a/hv_set_ifconfig.sh
|
|
+++ b/hv_set_ifconfig.sh
|
|
@@ -74,19 +74,22 @@
|
|
# call.
|
|
#
|
|
|
|
+# This is RHEL specific bash script that configures NM keyfiles.
|
|
+# ifcfg files passed as the first argument to this script remains untouched.
|
|
|
|
+if [ -z "$2" ]; then
|
|
+ echo "No input NM keyfile. Exiting!"
|
|
+ exit 1
|
|
+fi
|
|
|
|
-echo "IPV6INIT=yes" >> $1
|
|
-echo "PEERDNS=yes" >> $1
|
|
-echo "ONBOOT=yes" >> $1
|
|
+sed -i '/\[ipv4\]/a ignore-auto-dns=false' $2
|
|
+sed -i '/\[connection\]/a autoconnect=true' $2
|
|
|
|
-#Unlike older sysconfig scripts, NetworkManager expects GATEWAYx=ipaddr for all values of x.
|
|
-#So the first gateway is GATEWAY0 instead of GATEWAY. Other values should remain unchanged.
|
|
-#Workaround this by replacing GATEWAY= with GATEWAY0=.
|
|
-sed -i "s/GATEWAY=/GATEWAY0=/" $1
|
|
+filename="${2##*/}"
|
|
+chmod 600 $2
|
|
+cp $2 /etc/NetworkManager/system-connections/
|
|
|
|
-cp $1 /etc/sysconfig/network-scripts/
|
|
+nmcli connection load "/etc/NetworkManager/system-connections/${filename}"
|
|
+nmcli connection up filename "/etc/NetworkManager/system-connections/${filename}"
|
|
|
|
-filename="${1##*/}"
|
|
-nmcli connection load "/etc/sysconfig/network-scripts/${filename}"
|
|
-nmcli connection up filename "/etc/sysconfig/network-scripts/${filename}"
|
|
+exit 0
|
|
--
|
|
2.39.3
|
|
|