summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-03-11 19:56:03 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-03-11 19:56:03 -0500
commit44cbf065577bbe9ae9ffc783895cbe45f42c3f13 (patch)
tree219a7b2a284681196c80621d397a8407666a043f /pm
parentdce01897081f9c23b3b33ed600b4190ac91f8ee3 (diff)
parenta30d46c64050f919f96baf626ae13d79d1023317 (diff)
Merge branch 'vlowther-dynamic-hook-disable' into vlowther-default-parameters
Diffstat (limited to 'pm')
-rw-r--r--pm/pm-functions.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index 197c002..3670df6 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -105,7 +105,11 @@ hook_exit_status(){
hook_ok()
{
- [ -f "$STORAGEDIR/disable_hook:${1##*/}" ] && return $DX
+ local hook="${1##*/}"
+ ## the actual name as passed to us.
+ [ -f "$STORAGEDIR/disable_hook:$hook" ] && return $DX
+ ## name with zeros chopped off the filename
+ [ -f "$STORAGEDIR/disable_hook:${hook#[0-9][0-9]}" ] && return $DX
[ -x "$1" ] || return $NX
return 0
}