aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2018-08-01 17:41:08 +0200
committerDee'Kej <deekej@linuxmail.org>2018-08-03 13:03:15 +0200
commit285473ae10611849129eb16050ea6d6b8d84388d (patch)
tree16a1678d6b8d46f6f8563dce165719649d652e52
parent1a7c6bdccce821275789a998a6decbbaf2d33f39 (diff)
downloadinitscripts-285473ae10611849129eb16050ea6d6b8d84388d.tar
initscripts-285473ae10611849129eb16050ea6d6b8d84388d.tar.gz
initscripts-285473ae10611849129eb16050ea6d6b8d84388d.tar.bz2
initscripts-285473ae10611849129eb16050ea6d6b8d84388d.tar.xz
initscripts-285473ae10611849129eb16050ea6d6b8d84388d.zip
network/ifup/ifdown: deprecation warnings for 'network-scripts' added
In case of 'network' service these warnings are displayed only once, to not spam unnecessarily user's journalctl if they have many NICs.
-rwxr-xr-xetc/rc.d/init.d/network7
-rwxr-xr-xnetwork-scripts/ifdown6
-rwxr-xr-xnetwork-scripts/ifup6
3 files changed, 19 insertions, 0 deletions
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network
index 52b2d6b9..dfa81172 100755
--- a/etc/rc.d/init.d/network
+++ b/etc/rc.d/init.d/network
@@ -49,6 +49,13 @@ 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
+
+# This disables additional warnings during the boot process:
+export DEPRECATION_WARNING_ISSUED='true'
+
# See how we were called.
case "$1" in
start)
diff --git a/network-scripts/ifdown b/network-scripts/ifdown
index 18cee69d..aeb2f60c 100755
--- a/network-scripts/ifdown
+++ b/network-scripts/ifdown
@@ -16,6 +16,12 @@ 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
+ 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
+fi
+
need_config "${CONFIG}"
[ -f "$CONFIG" ] || {
diff --git a/network-scripts/ifup b/network-scripts/ifup
index d25db5af..574f5554 100755
--- a/network-scripts/ifup
+++ b/network-scripts/ifup
@@ -31,6 +31,12 @@ 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
+ 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
+fi
+
need_config "${CONFIG}"
[ -f "${CONFIG}" ] || {