diff options
Diffstat (limited to 'rc.d')
-rw-r--r-- | rc.d/init.d/functions | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index d48ee032..cda14b99 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -579,5 +579,26 @@ is_ignored_file() { esac return 1 } + +# Evaluate shvar-style booleans +is_true() { + case "$1" in + [tT] | [yY] | [yY][eE][sS] | [tT][rR][uU][eE]) + return 0 + ;; + esac + return 1 +} + +# Evaluate shvar-style booleans +is_false() { + case "$1" in + [fF] | [nN] | [nN][oO] | [fF][aA][lL][sS][eE]) + return 0 + ;; + esac + return 1 +} + # A sed expression to filter out the files that is_ignored_file recognizes __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d' |