From 66d26269a83229b7340f7ace06dfc715c04df7d8 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Thu, 12 Sep 2019 12:32:36 +0200 Subject: Repalace hardcoded tests for yes and no with testing functions Resolve issue: #42 --- network-scripts/network-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'network-scripts/network-functions') diff --git a/network-scripts/network-functions b/network-scripts/network-functions index 614ad490..5c6c3265 100644 --- a/network-scripts/network-functions +++ b/network-scripts/network-functions @@ -270,9 +270,9 @@ expand_config () toggle_value () { - if [ "$2" = "yes" -o "$2" = "YES" ] ; then + if is_true "$2"; then echo "$1 on" - elif [ "$2" = "no" -o "$2" = "NO" ] ; then + elif is_false "$2"; then echo "$1 off" else echo '' -- cgit v1.2.1