summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2009-06-13 21:01:17 -0500
committerVictor Lowther <victor.lowther@gmail.com>2009-06-13 21:01:17 -0500
commitb01d306fbba7dd8d7ab68a5a8c850472e9273277 (patch)
tree160a90821f5ad66df8f0b3cf87ebca52554a29b9 /pm
parentf66326636dd93afc115c64fc3320a6c2ef424a22 (diff)
Make is_set checking more explicit
If is_set is not one of the usual boolean values, return 2.
Diffstat (limited to 'pm')
-rw-r--r--pm/functions.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/pm/functions.in b/pm/functions.in
index fab9b38..0aba5ea 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -8,8 +8,9 @@
is_set()
{
case ${1-UNSET} in
- [Tt][Rr][Uu][Ee]|[Yy][Ee][Ss]|1|'') return 0;;
- *) return 1;;
+ true|yes|TRUE|YES|on|ON|1'') return 0;;
+ false|FALSE|no|NO|off|OFF|0|UNSET) return 1;;
+ *) return 2;;
esac
}