diff --git a/bugfix-limit-the-scope-of-ifdown-nonup-action.patch b/bugfix-limit-the-scope-of-ifdown-nonup-action.patch new file mode 100644 index 0000000000000000000000000000000000000000..902b1773aed5b4f22f5f9b670b0bdbcd73173ca4 --- /dev/null +++ b/bugfix-limit-the-scope-of-ifdown-nonup-action.patch @@ -0,0 +1,24 @@ +diff -aNur initscripts-a/etc/rc.d/init.d/network initscripts-b/etc/rc.d/init.d/network +--- initscripts-a/etc/rc.d/init.d/network 2023-05-24 17:25:11.777597268 +0800 ++++ initscripts-b/etc/rc.d/init.d/network 2023-05-24 17:27:59.212455365 +0800 +@@ -278,7 +278,7 @@ + [ $? -ne 0 ] && rc=1 + else + if ! echo "$bondlist" | grep -qw $DEVICE ; then +- action $"Shutting down non-UP interface $i: " ./ifdown $i boot ++ action $"Shutting down non-UP interface $i: " ./ifdown $i nonup + logger $"Running ifdown on non-UP interface $i" + fi + fi +diff -aNur initscripts-a/network-scripts/ifdown-eth initscripts-b/network-scripts/ifdown-eth +--- initscripts-a/network-scripts/ifdown-eth 2023-05-24 17:25:11.777597268 +0800 ++++ initscripts-b/network-scripts/ifdown-eth 2023-05-24 17:27:59.212455365 +0800 +@@ -167,7 +167,7 @@ + /sbin/iwconfig ${DEVICE} enc 0 >/dev/null 2>&1 + fi + +-if [ "$retcode" = "0" ]; then ++if [ "$retcode" = "0" -a "$2" = "boot" ]; then + /etc/sysconfig/network-scripts/ifdown-post $CONFIG + # do NOT use $? because ifdown should return whether or not + # the interface went down. diff --git a/initscripts.spec b/initscripts.spec index f86eb43ca07bdf0dbeb3d585de5504a84051176a..ca44586454a23ddf914a14a3669c0acaa65ebdb1 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.17 -Release: 4 +Release: 5 License: GPLv2 @@ -94,6 +94,7 @@ 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 +Patch9010: bugfix-limit-the-scope-of-ifdown-nonup-action.patch %description This package provides basic support for legacy System V init scripts, and some @@ -389,6 +390,12 @@ fi # ============================================================================= %changelog +* Wed May 24 2023 jiangjixiang - 10.17-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Limiting the scope of ifdown non-UP + * Fri Apr 14 2023 jammyjellyfish - 10.17-4 - Type:bugfix - ID:NA