aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2020-03-05 16:18:14 +0100
committerLukáš Nykrýn <lnykryn@redhat.com>2020-03-09 15:52:50 +0100
commit28dddb9c38a511276b239bf302830ede554aa420 (patch)
tree6e0db66a48446005729c5a8d9410febfa36d9489 /network-scripts
parent5fca0facd3acceba4030726720efb71e6e924682 (diff)
downloadinitscripts-28dddb9c38a511276b239bf302830ede554aa420.tar
initscripts-28dddb9c38a511276b239bf302830ede554aa420.tar.gz
initscripts-28dddb9c38a511276b239bf302830ede554aa420.tar.bz2
initscripts-28dddb9c38a511276b239bf302830ede554aa420.tar.xz
initscripts-28dddb9c38a511276b239bf302830ede554aa420.zip
Use function is_true for testing true conditions
Diffstat (limited to 'network-scripts')
-rwxr-xr-xnetwork-scripts/ifdown2
-rwxr-xr-xnetwork-scripts/ifup2
2 files changed, 2 insertions, 2 deletions
diff --git a/network-scripts/ifdown b/network-scripts/ifdown
index ec05891d..ceba9bab 100755
--- a/network-scripts/ifdown
+++ b/network-scripts/ifdown
@@ -47,7 +47,7 @@ then
exit 0
fi
-if [ "$_use_nm" = "true" ]; then
+if is_true "$_use_nm"; then
if [ -n "$UUID" -a -z "$DEVICE" ]; then
DEVICE=$(nmcli -t --fields uuid,device con show --active | awk -F ':' "\$1 == \"$UUID\" { print \$2 }")
fi
diff --git a/network-scripts/ifup b/network-scripts/ifup
index 9c1380bb..5aac4c9f 100755
--- a/network-scripts/ifup
+++ b/network-scripts/ifup
@@ -71,7 +71,7 @@ then
exit 0
fi
-if [ "$_use_nm" = "true" -a -n "$UUID" -a "$REALDEVICE" != "lo" ]; then
+if is_true "$_use_nm" && [ -n "$UUID" ] && [ "$REALDEVICE" != "lo" ]; then
if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]; then
exit 0
fi