summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-09-10 17:21:09 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-09-10 17:21:09 -0500
commit1f8e1bfb8b212d2edaf1f0bfd1a18aac23797cd5 (patch)
treee5aea6db9d67976db80bdbca7a40296548b9a182 /pm
parent5c193b1c9e24224f80cf59a8dd55f58e6b656fb8 (diff)
parentdd430a021b2d413a1b6ffc8e9fbe104b2f72f35f (diff)
Merge branch 'master' into auto-quirks
Diffstat (limited to 'pm')
-rw-r--r--pm/functions.in9
-rw-r--r--pm/pm-functions.in2
2 files changed, 10 insertions, 1 deletions
diff --git a/pm/functions.in b/pm/functions.in
index 5452fb4..2af9429 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -231,3 +231,12 @@ add_parameters() {
get_parameters() {
cat "$PARAMETERS"
}
+
+# check to see if a single parameter exists
+has_parameter()
+{
+ for p in $PARAMETERS; do
+ [ "$p" = "$1" ] && return 0
+ done
+ return 1
+}
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index ce79619..f7492a0 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -84,7 +84,7 @@ fi
# We do it this way because 'echo -n' is not posix.
log()
{
- [ $LOGGING ] || return;
+ [ $LOGGING ] || return 0;
local fmt='%s\n'
[ "$1" = "-n" ] && { fmt='%s'; shift; }
printf "$fmt" "$*"