summaryrefslogtreecommitdiff
path: root/pm/functions.in
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-03-06 13:44:31 -0600
committerVictor Lowther <victor.lowther@gmail.com>2008-03-06 13:44:31 -0600
commit4a9919cea52219555cb87e308afcace3104c39e2 (patch)
tree61e105ba64826a9a243d0b5ce7a8d1ce2113834a /pm/functions.in
parenta1431a2e40a2739cd05e5c6f0a7fc15a9e53ab2b (diff)
Add disablehook() function to functions.in.
This is the first step in allowing hooks to be dynamically disabled while pm-utils is running.
Diffstat (limited to 'pm/functions.in')
-rw-r--r--pm/functions.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/pm/functions.in b/pm/functions.in
index a7905ce..421fa65 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -155,6 +155,11 @@ restartservice()
[ -O "${STORAGEDIR}/service:$1" ] && service "$1" start
}
+disablehook()
+{
+ echo "${2:-${0$$*/}}" > "${STORAGEDIR}/disable_hook:$1"
+}
+
savestate()
{
echo "$2" > "${STORAGEDIR}/state:$1"