aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2018-08-02 15:05:17 +0200
committerDee'Kej <deekej@linuxmail.org>2018-08-03 13:06:43 +0200
commit335a6a84f618515c6902d374e391a301d0f43f6c (patch)
tree4233d19ada713915eb3c7eab71ceacfa2c4e7048
parent285473ae10611849129eb16050ea6d6b8d84388d (diff)
downloadinitscripts-335a6a84f618515c6902d374e391a301d0f43f6c.tar
initscripts-335a6a84f618515c6902d374e391a301d0f43f6c.tar.gz
initscripts-335a6a84f618515c6902d374e391a301d0f43f6c.tar.bz2
initscripts-335a6a84f618515c6902d374e391a301d0f43f6c.tar.xz
initscripts-335a6a84f618515c6902d374e391a301d0f43f6c.zip
network/ifup/ifdown: allow disabling of deprecation warnings
... by checking existence of /etc/sysconfig/disable-deprecation-warnings
-rwxr-xr-xetc/rc.d/init.d/network12
-rwxr-xr-xnetwork-scripts/ifdown2
-rwxr-xr-xnetwork-scripts/ifup2
3 files changed, 9 insertions, 7 deletions
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
index dfa81172..798e0d09 100755
--- a/etc/rc.d/init.d/network
+++ b/etc/rc.d/init.d/network
@@ -49,12 +49,14 @@ interfaces=$(ls ifcfg-* | \
LC_ALL=C sed 's/ //')
rc=0
-net_log $"You are using 'network' service provided by 'network-scripts', which are now deprecated." warning network
-net_log $"'network-scripts' will be removed in one of the next major releases of RHEL." warning network
-net_log $"It is advised to switch to 'NetworkManager' instead for network management." warning network
+if ! [ -f /etc/sysconfig/disable-deprecation-warnings ]; then
+ net_log $"You are using 'network' service provided by 'network-scripts', which are now deprecated." warning network
+ net_log $"'network-scripts' will be removed in one of the next major releases of RHEL." warning network
+ net_log $"It is advised to switch to 'NetworkManager' instead for network management." warning network
-# This disables additional warnings during the boot process:
-export DEPRECATION_WARNING_ISSUED='true'
+ # This disables additional warnings during the boot process:
+ export DEPRECATION_WARNING_ISSUED='true'
+fi
# See how we were called.
case "$1" in
diff --git a/network-scripts/ifdown b/network-scripts/ifdown
index aeb2f60c..9b4add62 100755
--- a/network-scripts/ifdown
+++ b/network-scripts/ifdown
@@ -16,7 +16,7 @@ CONFIG=$1
exit 1
}
-if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
+if ! [ -f /etc/sysconfig/disable-deprecation-warnings ] && ! is_true ${DEPRECATION_WARNING_ISSUED}; then
net_log $"You are using 'ifdown' script provided by 'network-scripts', which are now deprecated." warning ifdown
net_log $"'network-scripts' will be removed in one of the next major releases of RHEL." warning ifdown
net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifdown
diff --git a/network-scripts/ifup b/network-scripts/ifup
index 574f5554..8d7af318 100755
--- a/network-scripts/ifup
+++ b/network-scripts/ifup
@@ -31,7 +31,7 @@ CONFIG=${1}
exit 1
}
-if ! is_true ${DEPRECATION_WARNING_ISSUED}; then
+if ! [ -f /etc/sysconfig/disable-deprecation-warnings ] && ! is_true ${DEPRECATION_WARNING_ISSUED}; then
net_log $"You are using 'ifup' script provided by 'network-scripts', which are now deprecated." warning ifup
net_log $"'network-scripts' will be removed in one of the next major releases of RHEL." warning ifup
net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifup