From 45f1d2d3ab9d43bf52e2d1ccca33afb19d39b82d Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Thu, 30 Jun 2022 06:19:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=BA=E7=A9=BA=E6=88=96=E8=80=85?= =?UTF-8?q?=E4=BB=85=E6=9C=89=E7=A9=BA=E8=A1=8C=E6=97=B6network=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=89=A7=E8=A1=8Cresolv.conf=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- initscripts.spec | 9 ++++++++- kylinos-fixup-resolv.conf-empty-handle.patch | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 kylinos-fixup-resolv.conf-empty-handle.patch diff --git a/initscripts.spec b/initscripts.spec index 3c5c2ba..38d2864 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -20,7 +20,7 @@ Requires: gawk \ Name: initscripts Summary: Basic support for legacy System V init scripts Version: 10.12 -Release: 1 +Release: 2 License: GPLv2 @@ -93,6 +93,7 @@ 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: kylinos-fixup-resolv.conf-empty-handle.patch %description This package provides basic support for legacy System V init scripts, and some @@ -391,6 +392,12 @@ fi # ============================================================================= %changelog +* Thu Jun 30 2022 zhangqiang - 10.12-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Incorrect processing of empty files for resolv.conf + * Mon Dec 20 2021 xinghe - 10.12-1 - Type:requirements - ID:NA diff --git a/kylinos-fixup-resolv.conf-empty-handle.patch b/kylinos-fixup-resolv.conf-empty-handle.patch new file mode 100644 index 0000000..c5a9826 --- /dev/null +++ b/kylinos-fixup-resolv.conf-empty-handle.patch @@ -0,0 +1,12 @@ +diff --no-dereference -urN initscripts-10.12/network-scripts/ifup-post initscripts-10.12-new/network-scripts/ifup-post +--- initscripts-10.12/network-scripts/ifup-post 2021-09-03 15:25:11.000000000 +0800 ++++ initscripts-10.12-new/network-scripts/ifup-post 2022-06-30 06:01:40.477834575 +0800 +@@ -51,7 +51,7 @@ + # Test if the search field needs updating, or + # if the nameserver entries order should be updated: + if [ -n "${DOMAIN}" ] && ! grep -q "^search.*${DOMAIN}.*$" /etc/resolv.conf || +- ! tr --delete '\n' < /etc/resolv.conf | grep -E -q "${grep_regexp}"; then ++ ! echo "#Generated Stub"`tr --delete '\n' < /etc/resolv.conf` | grep -E -q "${grep_regexp}"; then + + if tmp_file=$(mktemp); then + search_str='' -- Gitee From db130ac79836e62b3593c49388f1befd08f10b29 Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Thu, 30 Jun 2022 06:19:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=BA=E7=A9=BA=E6=88=96=E8=80=85?= =?UTF-8?q?=E4=BB=85=E6=9C=89=E7=A9=BA=E8=A1=8C=E6=97=B6network=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=89=A7=E8=A1=8Cresolv.conf=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- initscripts.spec | 17 ++++++++++++++--- kylinos-fixup-resolv.conf-empty-handle.patch | 12 ++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 kylinos-fixup-resolv.conf-empty-handle.patch diff --git a/initscripts.spec b/initscripts.spec index 3c5c2ba..223013d 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -20,7 +20,7 @@ Requires: gawk \ Name: initscripts Summary: Basic support for legacy System V init scripts Version: 10.12 -Release: 1 +Release: 3 License: GPLv2 @@ -93,6 +93,7 @@ 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: kylinos-fixup-resolv.conf-empty-handle.patch %description This package provides basic support for legacy System V init scripts, and some @@ -310,8 +311,6 @@ fi # --------------- -%ghost %config(noreplace, missingok) %verify(not md5 size mtime) %{_sysconfdir}/rc.d/rc.local - %{_sysconfdir}/rc.d/init.d/functions # RC symlinks: @@ -391,6 +390,18 @@ fi # ============================================================================= %changelog +* Thu Jun 30 2022 zhangqiang - 10.12-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Incorrect processing of empty files for resolv.conf + +* Thu Jun 30 2022 xingwei - 10.12-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Initscripts no looger care about rc.local + * Mon Dec 20 2021 xinghe - 10.12-1 - Type:requirements - ID:NA diff --git a/kylinos-fixup-resolv.conf-empty-handle.patch b/kylinos-fixup-resolv.conf-empty-handle.patch new file mode 100644 index 0000000..c5a9826 --- /dev/null +++ b/kylinos-fixup-resolv.conf-empty-handle.patch @@ -0,0 +1,12 @@ +diff --no-dereference -urN initscripts-10.12/network-scripts/ifup-post initscripts-10.12-new/network-scripts/ifup-post +--- initscripts-10.12/network-scripts/ifup-post 2021-09-03 15:25:11.000000000 +0800 ++++ initscripts-10.12-new/network-scripts/ifup-post 2022-06-30 06:01:40.477834575 +0800 +@@ -51,7 +51,7 @@ + # Test if the search field needs updating, or + # if the nameserver entries order should be updated: + if [ -n "${DOMAIN}" ] && ! grep -q "^search.*${DOMAIN}.*$" /etc/resolv.conf || +- ! tr --delete '\n' < /etc/resolv.conf | grep -E -q "${grep_regexp}"; then ++ ! echo "#Generated Stub"`tr --delete '\n' < /etc/resolv.conf` | grep -E -q "${grep_regexp}"; then + + if tmp_file=$(mktemp); then + search_str='' -- Gitee