diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2017-07-24 14:33:58 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-10-31 12:36:19 +0100 |
commit | 2d35da4d458b5b9e7f6f2dd71b154286363ddf66 (patch) | |
tree | 4babf45179cc94ad6067f06a77f9479615d024ad | |
parent | 3e524c51a3438cbfc92a5ad19614b3bf8fbd4000 (diff) | |
download | initscripts-2d35da4d458b5b9e7f6f2dd71b154286363ddf66.tar initscripts-2d35da4d458b5b9e7f6f2dd71b154286363ddf66.tar.gz initscripts-2d35da4d458b5b9e7f6f2dd71b154286363ddf66.tar.bz2 initscripts-2d35da4d458b5b9e7f6f2dd71b154286363ddf66.tar.xz initscripts-2d35da4d458b5b9e7f6f2dd71b154286363ddf66.zip |
init.d/functions: is_true() & is_false() extended by ON/OFF support
In some cases we are using "on" or "off" as values. is_true()
and is_false() can be used for evaluation of these values as well.
-rw-r--r-- | rc.d/init.d/functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 08d7e0f4..6eb183f1 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -628,7 +628,7 @@ is_ignored_file() { # Evaluate shvar-style booleans is_true() { case "$1" in - [tT] | [yY] | [yY][eE][sS] | [tT][rR][uU][eE] | 1) + [tT] | [yY] | [yY][eE][sS] | [oO][nN] | [tT][rR][uU][eE] | 1) return 0 ;; esac @@ -638,7 +638,7 @@ is_true() { # Evaluate shvar-style booleans is_false() { case "$1" in - [fF] | [nN] | [nN][oO] | [fF][aA][lL][sS][eE] | 0) + [fF] | [nN] | [nN][oO] | [oO][fF][fF] | [fF][aA][lL][sS][eE] | 0) return 0 ;; esac |