aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts/ifdown
diff options
context:
space:
mode:
authorZhiqiang Liu <liuzhiqiang26@huawei.com>2019-07-22 13:38:55 +0800
committerLukáš Nykrýn <lnykryn@redhat.com>2019-07-25 13:53:06 +0200
commitd6af590090a2a8ffd45e273bdbd46a3fefc8debb (patch)
tree32d8b901963362f7a01056fa21e0eb97826a1a2d /network-scripts/ifdown
parent495bbf37cb2552db07d8f0ca9d7e200a576ed5cb (diff)
downloadinitscripts-d6af590090a2a8ffd45e273bdbd46a3fefc8debb.tar
initscripts-d6af590090a2a8ffd45e273bdbd46a3fefc8debb.tar.gz
initscripts-d6af590090a2a8ffd45e273bdbd46a3fefc8debb.tar.bz2
initscripts-d6af590090a2a8ffd45e273bdbd46a3fefc8debb.tar.xz
initscripts-d6af590090a2a8ffd45e273bdbd46a3fefc8debb.zip
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>
Diffstat (limited to 'network-scripts/ifdown')
-rwxr-xr-xnetwork-scripts/ifdown12
1 files changed, 6 insertions, 6 deletions
diff --git a/network-scripts/ifdown b/network-scripts/ifdown
index aa8fce7b..ec05891d 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