aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts/network-functions
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2019-09-12 12:32:36 +0200
committerGitHub <noreply@github.com>2019-09-12 12:32:36 +0200
commit66d26269a83229b7340f7ace06dfc715c04df7d8 (patch)
treed25afcbba9d13d50f62fe8177ab4863c0c220c47 /network-scripts/network-functions
parentdd703a8494647d401dbffa0f036233e08044ec60 (diff)
downloadinitscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar
initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar.gz
initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar.bz2
initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar.xz
initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.zip
Repalace hardcoded tests for yes and no with testing functions
Resolve issue: #42
Diffstat (limited to 'network-scripts/network-functions')
-rw-r--r--network-scripts/network-functions4
1 files changed, 2 insertions, 2 deletions
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 ''