81 lines
3.0 KiB
Diff
81 lines
3.0 KiB
Diff
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
|
|
|