!42 remove unnecessary patches
From: @robertxw Reviewed-by: @gebidelidaye Signed-off-by: @gebidelidaye
This commit is contained in:
commit
b00ce6e6fa
@ -1,25 +0,0 @@
|
||||
From 76a5f892c132eed05a6cbffbdba3306e50b6a672 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Thu, 5 Oct 2017 12:40:38 -0400
|
||||
Subject: [PATCH 7/9] WRS: Patch10-run-ifdown-on-all-interfaces.patch
|
||||
|
||||
---
|
||||
etc/rc.d/init.d/network | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
|
||||
index a8deed3..852ef94 100755
|
||||
--- a/etc/rc.d/init.d/network
|
||||
+++ b/etc/rc.d/init.d/network
|
||||
@@ -235,6 +235,9 @@ stop)
|
||||
if ! check_device_down $DEVICE; then
|
||||
action $"Shutting down interface $i: " ./ifdown $i boot
|
||||
[ $? -ne 0 ] && rc=1
|
||||
+ else
|
||||
+ action $"Shutting down non-UP interface $i: " ./ifdown $i boot
|
||||
+ logger $"Running ifdown on non-UP interface $i"
|
||||
fi
|
||||
)
|
||||
done
|
||||
--
|
||||
1.9.1
|
||||
@ -1,62 +0,0 @@
|
||||
From 18a9b144be17afca1a5bdb9d1142e6dbf201d8a7 Mon Sep 17 00:00:00 2001
|
||||
From: zhangqiang <zhangqiang@kylinos.cn>
|
||||
Date: Mon, 7 Nov 2022 07:14:11 +0800
|
||||
Subject: [PATCH] Incorrect processing of empty files for resolv.conf When
|
||||
resolv.conf is empty or does not exist,ifup-post backup files that do not
|
||||
match expectations.
|
||||
|
||||
---
|
||||
network-scripts/ifup | 2 ++
|
||||
network-scripts/network-functions | 23 +++++++++++++++++++++++
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/network-scripts/ifup b/network-scripts/ifup
|
||||
index a053077..8871526 100755
|
||||
--- a/network-scripts/ifup
|
||||
+++ b/network-scripts/ifup
|
||||
@@ -50,6 +50,8 @@ if [ ${UID} != 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+init_resolv_conf
|
||||
+
|
||||
source_config
|
||||
|
||||
if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
|
||||
diff --git a/network-scripts/network-functions b/network-scripts/network-functions
|
||||
index eed3c91..83e4bea 100644
|
||||
--- a/network-scripts/network-functions
|
||||
+++ b/network-scripts/network-functions
|
||||
@@ -633,6 +633,29 @@ is_bonding_device ()
|
||||
[ -f "/sys/class/net/$1/bonding/slaves" ]
|
||||
}
|
||||
|
||||
+# Initialize /etc/resolv.conf when the network service starts
|
||||
+init_resolv_conf ()
|
||||
+{
|
||||
+ title="# Generated by network"
|
||||
+ if [ ! -f /etc/resolv.conf ];then
|
||||
+ echo ${title} > /etc/resolv.conf
|
||||
+ return 0
|
||||
+ fi
|
||||
+ #If the file exists and the content is empty or there are empty lines, the ifup-post condition will be judged wrongly,
|
||||
+ #and the backup process will be started. Add a comment at the first line here to solve the problem
|
||||
+ if ! grep -E -q "${title}" /etc/resolv.conf;then
|
||||
+ if tmp_file=$(mktemp);then
|
||||
+ echo ${title} > ${tmp_file}
|
||||
+ cat /etc/resolv.conf >> ${tmp_file}
|
||||
+ cp -rf ${tmp_file} /etc/resolv.conf
|
||||
+ /usr/bin/logger -p local7.notice -t "NET" -i "$0 : updated ${title} to /etc/resolv.conf"
|
||||
+ rm -rf ${tmp_file}
|
||||
+ else
|
||||
+ /usr/bin/logger -p local7.err -t "NET" -i "$0 : /etc/resolv.conf was not updated ${title}: failed to create temporary file"
|
||||
+ fi
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
# Invoke this when /etc/resolv.conf has changed:
|
||||
change_resolv_conf ()
|
||||
{
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
From a2cb13d3de5219f9ff0341f5c58fe50830a9de81 Mon Sep 17 00:00:00 2001
|
||||
From: zhouxudong <zhouxudong8@huawei.com>
|
||||
Date: Sun, 15 Sep 2019 18:39:20 +0800
|
||||
Subject: [PATCH] fix
|
||||
|
||||
---
|
||||
etc/rc.d/init.d/network | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
|
||||
index 58fbc4c..4de4a9c 100755
|
||||
--- a/etc/rc.d/init.d/network
|
||||
+++ b/etc/rc.d/init.d/network
|
||||
@@ -227,6 +227,7 @@ stop)
|
||||
remaining="$remaining $i"
|
||||
done
|
||||
|
||||
+ bondlist=`cat /proc/net/bonding/* 2> /dev/null | grep "Slave Inter" | awk '{print $3}'`
|
||||
for i in $vpninterfaces $xdslinterfaces $bridgeinterfaces $vlaninterfaces $remaining; do
|
||||
unset DEVICE TYPE
|
||||
(. ./ifcfg-$i
|
||||
@@ -236,8 +237,10 @@ stop)
|
||||
action $"Shutting down interface $i: " ./ifdown $i boot
|
||||
[ $? -ne 0 ] && rc=1
|
||||
else
|
||||
- action $"Shutting down non-UP interface $i: " ./ifdown $i boot
|
||||
- logger $"Running ifdown on non-UP interface $i"
|
||||
+ if ! echo "$bondlist" | grep -qw $DEVICE ; then
|
||||
+ action $"Shutting down non-UP interface $i: " ./ifdown $i boot
|
||||
+ logger $"Running ifdown on non-UP interface $i"
|
||||
+ fi
|
||||
fi
|
||||
)
|
||||
done
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@ -20,7 +20,7 @@ Requires: gawk \
|
||||
Name: initscripts
|
||||
Summary: Basic support for legacy System V init scripts
|
||||
Version: 10.17
|
||||
Release: 4
|
||||
Release: 5
|
||||
|
||||
License: GPLv2
|
||||
|
||||
@ -81,19 +81,16 @@ Obsoletes: %{name} < 9.82-2
|
||||
|
||||
# Patches to be removed -- deprecated functionality which shall be removed at
|
||||
# --------------------- some point in the future:
|
||||
Patch0: backport-run-ifdown-on-all-interfaces.patch
|
||||
|
||||
|
||||
Patch9000: bugfix-initscripts-add-udev-wait-dependency-for-network.patch
|
||||
Patch9001: bugfix-mod-network-function-when-NM-unmanage-devices.patch
|
||||
Patch9002: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch
|
||||
Patch9003: bugfix-network-need-chkconfig-on.patch
|
||||
Patch9004: bugfix-restart-network-warning.patch
|
||||
Patch9005: new-network-fork-to-start-dhcp.patch
|
||||
Patch9006: exec-udevadm-settle-when-network-start.patch
|
||||
Patch9007: remove-rename_device_lock-when-process-does-not-exis.patch
|
||||
Patch9008: bugfix-Incorrect-processing-of-empty-files-for-resolv.conf.patch
|
||||
Patch9009: support-specify-cc.patch
|
||||
Patch9004: new-network-fork-to-start-dhcp.patch
|
||||
Patch9005: exec-udevadm-settle-when-network-start.patch
|
||||
Patch9006: remove-rename_device_lock-when-process-does-not-exis.patch
|
||||
Patch9007: support-specify-cc.patch
|
||||
|
||||
%description
|
||||
This package provides basic support for legacy System V init scripts, and some
|
||||
@ -389,6 +386,12 @@ fi
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Thu Jun 15 gaoxingwang <gaoxingwang1@huawei.com> - 10.17-5
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:remove unnecessary patches because the first introduced problem doesn't make much sense to fix
|
||||
|
||||
* Fri Apr 14 2023 jammyjellyfish <jammyjellyfish255@outlook.com> - 10.17-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user