summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
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
}