diff --git a/initscripts.spec b/initscripts.spec index 2573d91aaa4f463625ff833a42c06772c96f47ba..223013d11bf17120bd2c6ac2d67b0d1cdbcd3398 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: 2 +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 @@ -389,6 +390,12 @@ 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 diff --git a/kylinos-fixup-resolv.conf-empty-handle.patch b/kylinos-fixup-resolv.conf-empty-handle.patch new file mode 100644 index 0000000000000000000000000000000000000000..c5a9826dee1228e2230b25bd5f60984e6eea610f --- /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=''