Compare commits
No commits in common. "a0250d34cb2def22ab9861276cd947df3aee2ac2" and "3b6f40c8e1bdf3475f5a1b7407fa5e6bd8ffac16" have entirely different histories.
a0250d34cb
...
3b6f40c8e1
@ -1,32 +0,0 @@
|
|||||||
From 2b185d6bb1eda7e5bdd885afc88bf404d2c1f861 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Fri, 1 Mar 2024 14:36:45 +0100
|
|
||||||
Subject: [PATCH] rename_device: free path after it is used
|
|
||||||
|
|
||||||
Conflict: NA
|
|
||||||
Reference: https://github.com/fedora-sysv/initscripts/commit/2b185d6bb1eda7e5bdd885afc88bf404d2c1f861
|
|
||||||
---
|
|
||||||
src/rename_device.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/rename_device.c b/src/rename_device.c
|
|
||||||
index 0d29f64d..e6b09f45 100644
|
|
||||||
--- a/src/rename_device.c
|
|
||||||
+++ b/src/rename_device.c
|
|
||||||
@@ -180,7 +180,7 @@ struct netdev *get_configs() {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
for (x = 0; x < ncfgs; x++ ) {
|
|
||||||
- char *path;
|
|
||||||
+ char *path = NULL;
|
|
||||||
char *devname, *hwaddr;
|
|
||||||
int vlan;
|
|
||||||
gchar *contents, **lines;
|
|
||||||
@@ -193,6 +193,7 @@ struct netdev *get_configs() {
|
|
||||||
cfgs[x]->d_name) == -1)
|
|
||||||
continue;
|
|
||||||
g_file_get_contents(path, &contents, NULL, NULL);
|
|
||||||
+ free(path);
|
|
||||||
if (!contents)
|
|
||||||
continue;
|
|
||||||
lines = g_strsplit(contents,"\n", 0);
|
|
||||||
25
backport-run-ifdown-on-all-interfaces.patch
Normal file
25
backport-run-ifdown-on-all-interfaces.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
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
|
||||||
|
|
||||||
37
bugfix-restart-network-warning.patch
Normal file
37
bugfix-restart-network-warning.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
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
|
||||||
|
|
||||||
BIN
initscripts-10.17.tar.gz
Normal file
BIN
initscripts-10.17.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -19,10 +19,10 @@ Requires: gawk \
|
|||||||
|
|
||||||
Name: initscripts
|
Name: initscripts
|
||||||
Summary: Basic support for legacy System V init scripts
|
Summary: Basic support for legacy System V init scripts
|
||||||
Version: 10.19
|
Version: 10.17
|
||||||
Release: 2
|
Release: 2
|
||||||
|
|
||||||
License: GPL-2.0-only
|
License: GPLv2
|
||||||
|
|
||||||
URL: https://github.com/fedora-sysv/initscripts
|
URL: https://github.com/fedora-sysv/initscripts
|
||||||
Source: https://github.com/fedora-sysv/initscripts/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/fedora-sysv/initscripts/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
@ -81,17 +81,18 @@ Obsoletes: %{name} < 9.82-2
|
|||||||
|
|
||||||
# Patches to be removed -- deprecated functionality which shall be removed at
|
# Patches to be removed -- deprecated functionality which shall be removed at
|
||||||
# --------------------- some point in the future:
|
# --------------------- some point in the future:
|
||||||
Patch0: backport-rename_device-free-path-after-it-is-used.patch
|
Patch0: backport-run-ifdown-on-all-interfaces.patch
|
||||||
|
|
||||||
|
|
||||||
Patch9000: bugfix-initscripts-add-udev-wait-dependency-for-network.patch
|
Patch9000: bugfix-initscripts-add-udev-wait-dependency-for-network.patch
|
||||||
Patch9001: bugfix-mod-network-function-when-NM-unmanage-devices.patch
|
Patch9001: bugfix-mod-network-function-when-NM-unmanage-devices.patch
|
||||||
Patch9002: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch
|
Patch9002: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch
|
||||||
Patch9003: bugfix-network-need-chkconfig-on.patch
|
Patch9003: bugfix-network-need-chkconfig-on.patch
|
||||||
Patch9004: new-network-fork-to-start-dhcp.patch
|
Patch9004: bugfix-restart-network-warning.patch
|
||||||
Patch9005: exec-udevadm-settle-when-network-start.patch
|
Patch9005: new-network-fork-to-start-dhcp.patch
|
||||||
Patch9006: remove-rename_device_lock-when-process-does-not-exis.patch
|
Patch9006: exec-udevadm-settle-when-network-start.patch
|
||||||
Patch9007: support-specify-cc.patch
|
Patch9007: remove-rename_device_lock-when-process-does-not-exis.patch
|
||||||
|
Patch9008: bugfix-Incorrect-processing-of-empty-files-for-resolv.conf.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides basic support for legacy System V init scripts, and some
|
This package provides basic support for legacy System V init scripts, and some
|
||||||
@ -123,6 +124,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
Requires: bc
|
Requires: bc
|
||||||
Requires: dbus
|
Requires: dbus
|
||||||
|
Requires: dbus-tools
|
||||||
Requires: gawk
|
Requires: gawk
|
||||||
Requires: grep
|
Requires: grep
|
||||||
Requires: hostname
|
Requires: hostname
|
||||||
@ -387,37 +389,6 @@ fi
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 13 2025 xinghe <xinghe2@h-partners.com> - 10.19-2
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:rename_device: free path after it is used
|
|
||||||
|
|
||||||
* Thu Feb 1 2024 liubo <liubo335@huawei.com> - 10.19-1
|
|
||||||
- Type: requirement
|
|
||||||
- ID: NA
|
|
||||||
- SUG: NA
|
|
||||||
- DESC: update to version 10.19
|
|
||||||
|
|
||||||
* 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
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:Support specify CC
|
|
||||||
|
|
||||||
|
|
||||||
* Mon Feb 20 2023 gaihuiying <eaglegai@163.com> - 10.17-3
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:delete Requires:dbus-tools
|
|
||||||
|
|
||||||
* Mon Nov 07 2022 zhangqiang <zhangqiang@kylinos.cn> - 10.17-2
|
* Mon Nov 07 2022 zhangqiang <zhangqiang@kylinos.cn> - 10.17-2
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
From: jammyjellyfish <jammyjellyfish255@outlook.com>
|
|
||||||
Date: Mon Apr 17 01:49:49 PM CST 2023
|
|
||||||
Subject: Support specify CC
|
|
||||||
diff -up initscripts-10.17/src/Makefile.orig2 initscripts-10.17/src/Makefile
|
|
||||||
--- initscripts-10.17/src/Makefile.orig2 2023-04-14 22:39:35.308829467 +0800
|
|
||||||
+++ initscripts-10.17/src/Makefile 2023-04-14 22:39:49.296867265 +0800
|
|
||||||
@@ -17,7 +17,7 @@ bindir = $(prefix)/bin
|
|
||||||
sbindir = $(prefix)/sbin
|
|
||||||
libdir = $(prefix)/lib
|
|
||||||
|
|
||||||
-CC = gcc
|
|
||||||
+CC ?= gcc
|
|
||||||
CFLAGS += $(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE -fPIE
|
|
||||||
LDFLAGS += $(RPM_LD_FLAGS) -pie -z relro -z now
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user