commit
a0d1e7101c
@ -1,28 +0,0 @@
|
|||||||
From: wangxiao <wangxiao65@huawei.com>
|
|
||||||
Subject: [PATCH] initscripts: maintain permissions set umask in case resolvconf doesn't exist
|
|
||||||
reason: maintain permissions set umask in case resolvconf doesn't exist
|
|
||||||
diff --git a/network-scripts/network-functions b/network-scripts/network-functions
|
|
||||||
index 7f5dfb0..8deda57 100644
|
|
||||||
--- a/network-scripts/network-functions
|
|
||||||
+++ b/network-scripts/network-functions
|
|
||||||
@@ -619,6 +619,11 @@
|
|
||||||
# Invoke this when /etc/resolv.conf has changed:
|
|
||||||
change_resolv_conf ()
|
|
||||||
{
|
|
||||||
+ # maintain permissions
|
|
||||||
+ # but set umask in case it doesn't exist!
|
|
||||||
+ oldumask=$(umask)
|
|
||||||
+ umask 022
|
|
||||||
+
|
|
||||||
s=$(/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null)
|
|
||||||
if [ $# -gt 1 ]; then
|
|
||||||
if [ "x$s" != "x" ]; then
|
|
||||||
@@ -654,6 +659,8 @@
|
|
||||||
/usr/bin/logger -p local7.notice -t "NET" -i "$0 : updated /etc/resolv.conf"
|
|
||||||
[ -e /run/nscd/socket ] && /usr/sbin/nscd -i hosts # invalidate cache
|
|
||||||
fi
|
|
||||||
+
|
|
||||||
+ umask $oldumask
|
|
||||||
return $r
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
From 8db1d31e6715dce9d34dbcaaa85b38646b2ec3d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: rpm-build <rpm-build>
|
|
||||||
Date: Thu, 5 Mar 2020 09:48:44 +0800
|
|
||||||
Subject: [PATCH] initscripts:adapt to the grep command
|
|
||||||
|
|
||||||
Signed-off-by: zhanglu <zhanglu37@huawei.com>
|
|
||||||
---
|
|
||||||
etc/rc.d/init.d/network | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
|
|
||||||
index f69948e..9a0c3f3 100755
|
|
||||||
--- a/etc/rc.d/init.d/network
|
|
||||||
+++ b/etc/rc.d/init.d/network
|
|
||||||
@@ -132,7 +132,7 @@ start)
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then
|
|
||||||
+ if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then
|
|
||||||
# this loads the module, to preserve ordering
|
|
||||||
is_available $i
|
|
||||||
continue
|
|
||||||
@@ -149,7 +149,7 @@ start)
|
|
||||||
|
|
||||||
# Bring up xDSL and VPN interfaces
|
|
||||||
for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do
|
|
||||||
- if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
|
|
||||||
+ if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
|
|
||||||
if [ "$godamon" != "1" ] ; then
|
|
||||||
action $"Bringing up interface $i: " ./ifup $i boot
|
|
||||||
[ $? -ne 0 ] && rc=1
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
From d6af590090a2a8ffd45e273bdbd46a3fefc8debb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
|
|
||||||
Date: Mon, 22 Jul 2019 13:38:55 +0800
|
|
||||||
Subject: [PATCH] ifup/ifdown: print DEPRECATION_WARNING_ISSUED waring info
|
|
||||||
after source_config
|
|
||||||
|
|
||||||
In ifup/ifdown scripts, move deprecation waring info after
|
|
||||||
source_config, so users can config DEPRECATION_WARNING_ISSUED in
|
|
||||||
ifcfg-** file to decide whether show deprecation waring info when
|
|
||||||
calling ifup/ifdown.
|
|
||||||
|
|
||||||
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
|
|
||||||
---
|
|
||||||
network-scripts/ifdown | 12 ++++++------
|
|
||||||
network-scripts/ifup | 12 ++++++------
|
|
||||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/network-scripts/ifdown b/network-scripts/ifdown
|
|
||||||
index aa8fce7..ec05891 100755
|
|
||||||
--- a/network-scripts/ifdown
|
|
||||||
+++ b/network-scripts/ifdown
|
|
||||||
@@ -16,12 +16,6 @@ CONFIG=$1
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
-if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
|
|
||||||
- net_log $"You are using 'ifdown' script provided by 'network-scripts', which are now deprecated." warning ifdown >&2
|
|
||||||
- net_log $"'network-scripts' will be removed from distribution in near future." warning ifdown >&2
|
|
||||||
- net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifdown >&2
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
need_config "${CONFIG}"
|
|
||||||
|
|
||||||
[ -f "$CONFIG" ] || {
|
|
||||||
@@ -42,6 +36,12 @@ fi
|
|
||||||
|
|
||||||
source_config
|
|
||||||
|
|
||||||
+if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
|
|
||||||
+ net_log $"You are using 'ifdown' script provided by 'network-scripts', which are now deprecated." warning ifdown >&2
|
|
||||||
+ net_log $"'network-scripts' will be removed from distribution in near future." warning ifdown >&2
|
|
||||||
+ net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifdown >&2
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
if [ -n "$IN_HOTPLUG" ] && [ "${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO" ]
|
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
diff --git a/network-scripts/ifup b/network-scripts/ifup
|
|
||||||
index 435c317..397dd93 100755
|
|
||||||
--- a/network-scripts/ifup
|
|
||||||
+++ b/network-scripts/ifup
|
|
||||||
@@ -31,12 +31,6 @@ CONFIG=${1}
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
-if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
|
|
||||||
- net_log $"You are using 'ifup' script provided by 'network-scripts', which are now deprecated." warning ifup >&2
|
|
||||||
- net_log $"'network-scripts' will be removed from distribution in near future." warning ifup >&2
|
|
||||||
- net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifup >&2
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
need_config "${CONFIG}"
|
|
||||||
|
|
||||||
[ -f "${CONFIG}" ] || {
|
|
||||||
@@ -58,6 +52,12 @@ fi
|
|
||||||
|
|
||||||
source_config
|
|
||||||
|
|
||||||
+if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
|
|
||||||
+ net_log $"You are using 'ifup' script provided by 'network-scripts', which are now deprecated." warning ifup >&2
|
|
||||||
+ net_log $"'network-scripts' will be removed from distribution in near future." warning ifup >&2
|
|
||||||
+ net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifup >&2
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
if [ "foo$2" = "fooboot" ] && [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ]
|
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
--
|
|
||||||
2.6.1.windows.1
|
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From bf6a9d7d1f708077bfaad8ea109ad8b4eeb69556 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
|
||||||
Date: Mon, 20 Aug 2018 14:31:56 +0200
|
|
||||||
Subject: [PATCH 3/4] ifup-post: fix incorrect condition for RESOLV_MODS
|
|
||||||
|
|
||||||
This was causing the /etc/resolv.conf file to be always updated when
|
|
||||||
RESOLV_MODS was not set...
|
|
||||||
|
|
||||||
Before the commit 5d6156454bf8f6dab4a5fdd7e1bf6 we were not updating
|
|
||||||
the /etc/resolv.conf file if the RESOLV_MODS was empty.
|
|
||||||
|
|
||||||
See https://bugzilla.redhat.com/show_bug.cgi?id=1610411 for more info.
|
|
||||||
---
|
|
||||||
network-scripts/ifup-post | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/network-scripts/ifup-post b/network-scripts/ifup-post
|
|
||||||
index 5a89cbf3..4cb986f8 100755
|
|
||||||
--- a/network-scripts/ifup-post
|
|
||||||
+++ b/network-scripts/ifup-post
|
|
||||||
@@ -28,7 +28,7 @@ if ! is_true "$NOROUTESET"; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
-if ! is_false "${PEERDNS}" || ! is_false "${RESOLV_MODS}"; then
|
|
||||||
+if ! is_false "${PEERDNS}" || is_true "${RESOLV_MODS}"; then
|
|
||||||
# Obtain the DNS entries when using PPP if necessary:
|
|
||||||
[ -n "${MS_DNS1}" ] && DNS1="${MS_DNS1}"
|
|
||||||
[ -n "${MS_DNS2}" ] && DNS2="${MS_DNS2}"
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
initscripts-10.04.tar.gz
Normal file
BIN
initscripts-10.04.tar.gz
Normal file
Binary file not shown.
@ -19,8 +19,8 @@ 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.01
|
Version: 10.04
|
||||||
Release: 7
|
Release: 1
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
|
|
||||||
@ -81,20 +81,16 @@ 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:
|
||||||
Patch6000: ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch
|
Patch6000: run-ifdown-on-all-interfaces.patch
|
||||||
Patch6001: ifup-post-fix-incorrect-condition-for-RESOLV_MODS.patch
|
|
||||||
Patch6002: run-ifdown-on-all-interfaces.patch
|
|
||||||
|
|
||||||
|
|
||||||
Patch9000: bugfix-maintain-permissions-set-umask-in-case-resolvconf-doesnt-exist.patch
|
Patch9000: bugfix-initscripts-add-udev-wait-dependency-for-network.patch
|
||||||
Patch9001: bugfix-initscripts-add-udev-wait-dependency-for-network.patch
|
Patch9001: bugfix-mod-network-function-when-NM-unmanage-devices.patch
|
||||||
Patch9002: bugfix-mod-network-function-when-NM-unmanage-devices.patch
|
Patch9002: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch
|
||||||
Patch9003: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch
|
Patch9003: bugfix-network-need-chkconfig-on.patch
|
||||||
Patch9004: bugfix-network-need-chkconfig-on.patch
|
Patch9004: bugfix-restart-network-warning.patch
|
||||||
Patch9005: bugfix-restart-network-warning.patch
|
Patch9005: new-network-fork-to-start-dhcp.patch
|
||||||
Patch9006: new-network-fork-to-start-dhcp.patch
|
Patch9006: exec-udevadm-settle-when-network-start.patch
|
||||||
Patch9007: exec-udevadm-settle-when-network-start.patch
|
|
||||||
Patch9008: bugfix-network-check-val-of-the-grep.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
|
||||||
@ -296,6 +292,7 @@ fi
|
|||||||
|
|
||||||
# RC symlinks:
|
# RC symlinks:
|
||||||
%{_sysconfdir}/rc[0-6].d
|
%{_sysconfdir}/rc[0-6].d
|
||||||
|
%{_sysconfdir}/init.d
|
||||||
|
|
||||||
# ---------------
|
# ---------------
|
||||||
|
|
||||||
@ -361,6 +358,12 @@ fi
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 24 2020 hanzhijun<hanzhijun1@huawei.com> - 10.04-1
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:update to 10.04
|
||||||
|
|
||||||
* Thu Apr 9 2020 songnannan <songnannan2@huawei.com> - 10.01-7
|
* Thu Apr 9 2020 songnannan <songnannan2@huawei.com> - 10.01-7
|
||||||
- add openEuler in the conditional branch
|
- add openEuler in the conditional branch
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ Signed-off-by: rpm-build <rpm-build>
|
|||||||
1 file changed, 31 insertions(+), 5 deletions(-)
|
1 file changed, 31 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
|
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
|
||||||
index 97e6ed1..5f95ee0 100755
|
index 31bbe20..994425d 100755
|
||||||
--- a/etc/rc.d/init.d/network
|
--- a/etc/rc.d/init.d/network
|
||||||
+++ b/etc/rc.d/init.d/network
|
+++ b/etc/rc.d/init.d/network
|
||||||
@@ -49,6 +49,8 @@ interfaces=$(ls ifcfg-* | \
|
@@ -49,6 +49,8 @@ interfaces=$(ls ifcfg-* | \
|
||||||
@ -19,40 +19,38 @@ index 97e6ed1..5f95ee0 100755
|
|||||||
rc=0
|
rc=0
|
||||||
|
|
||||||
+godamon=0
|
+godamon=0
|
||||||
+
|
+
|
||||||
net_log $"You are using 'network' service provided by 'network-scripts', which are now deprecated." warning network >&2
|
net_log $"You are using 'network' service provided by 'network-scripts', which are now deprecated." warning network >&2
|
||||||
net_log $"'network-scripts' will be removed from distribution in near future." warning network >&2
|
net_log $"'network-scripts' will be removed from distribution in near future." warning network >&2
|
||||||
net_log $"It is advised to switch to 'NetworkManager' instead for network management." warning network >&2
|
net_log $"It is advised to switch to 'NetworkManager' instead for network management." warning network >&2
|
||||||
@@ -131,17 +133,41 @@ start)
|
@@ -129,18 +131,39 @@ start)
|
||||||
is_available $i
|
is_available $i
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
- action $"Bringing up interface $i: " ./ifup $i boot
|
- action $"Bringing up interface $i: " ./ifup $i boot
|
||||||
- [ $? -ne 0 ] && rc=1
|
- [ $? -ne 0 ] && rc=1
|
||||||
+ if [ "$godamon" != "1" ] ; then
|
+ if [ "$godamon" != "1" ] ; then
|
||||||
+ action $"Bringing up interface $i: " ./ifup $i boot
|
+ action $"Bringing up interface $i: " ./ifup $i boot
|
||||||
+ [ $? -ne 0 ] && rc=1
|
+ [ $? -ne 0 ] && rc=1
|
||||||
+ else
|
+ else
|
||||||
+ action $"Bringing up interface $i: " ./ifup $i boot &
|
+ action $"Bringing up interface $i: " ./ifup $i boot &
|
||||||
+ fi
|
+ fi
|
||||||
+
|
|
||||||
+
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Bring up xDSL and VPN interfaces
|
# Bring up xDSL and VPN interfaces
|
||||||
for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do
|
for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do
|
||||||
if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
|
if ( . ./ifcfg-"$i" ; ! is_false "$ONBOOT" ) ; then
|
||||||
- action $"Bringing up interface $i: " ./ifup $i boot
|
- action $"Bringing up interface $i: " ./ifup $i boot
|
||||||
- [ $? -ne 0 ] && rc=1
|
- [ $? -ne 0 ] && rc=1
|
||||||
- fi
|
+ if [ "$godamon" != "1" ] ; then
|
||||||
+ if [ "$godamon" != "1" ] ; then
|
+ action $"Bringing up interface $i: " ./ifup $i boot
|
||||||
+ action $"Bringing up interface $i: " ./ifup $i boot
|
+ [ $? -ne 0 ] && rc=1
|
||||||
+ [ $? -ne 0 ] && rc=1
|
+ else
|
||||||
+ else
|
+ action $"Bringing up interface $i: " ./ifup $i boot &
|
||||||
+ action $"Bringing up interface $i: " ./ifup $i boot &
|
+ fi
|
||||||
+ fi
|
fi
|
||||||
+ fi
|
|
||||||
done
|
done
|
||||||
|
-
|
||||||
+ # Waiting until all background process done
|
+ # Waiting until all background process done
|
||||||
+ if [ "$godamon" = "1" ] ; then
|
+ if [ "$godamon" = "1" ] ; then
|
||||||
+ for pid in $(jobs -p)
|
+ for pid in $(jobs -p)
|
||||||
@ -67,9 +65,8 @@ index 97e6ed1..5f95ee0 100755
|
|||||||
+ rc=0
|
+ rc=0
|
||||||
+ done
|
+ done
|
||||||
+ fi
|
+ fi
|
||||||
|
|
||||||
# Add non interface-specific static-routes.
|
# Add non interface-specific static-routes.
|
||||||
if [ -f /etc/sysconfig/static-routes ]; then
|
if [ -f /etc/sysconfig/static-routes ]; then
|
||||||
|
if [ -x /sbin/route ]; then
|
||||||
--
|
--
|
||||||
2.19.1
|
2.19.1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user