summaryrefslogtreecommitdiff
path: root/misc/g15daemon/51g15hook.sh
diff options
context:
space:
mode:
authorAlan Alberghini <414N@slacky.it>2011-09-07 23:15:17 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-21 19:48:31 -0300
commit5956ee581d602e2cadcc7d24fb7d9958040480d4 (patch)
tree565e4df6d456034a0c671fb3ea48b39175dfa691 /misc/g15daemon/51g15hook.sh
parentf640bfb8573e7cf161d8f1ac0a368cadc81eb3e5 (diff)
downloadslackbuilds-5956ee581d602e2cadcc7d24fb7d9958040480d4.tar.gz
misc/g15daemon: Patch to fix Gn keys and suspend fixes.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'misc/g15daemon/51g15hook.sh')
-rw-r--r--misc/g15daemon/51g15hook.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/misc/g15daemon/51g15hook.sh b/misc/g15daemon/51g15hook.sh
new file mode 100644
index 0000000000..a46a742370
--- /dev/null
+++ b/misc/g15daemon/51g15hook.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+# g15daemon hook script for pm-utils.
+# If you use g15daemon in conjunction with pm-utils, this hook script
+# stops g15daemon when suspending/hinernating and restarts it when
+# resuming/thawing.
+# Copyright (c) 2011 Alan Alberghini <414N@slacky.it>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+
+if [ -x /etc/rc.d/rc.g15daemon ]
+then
+ case $1 in
+ resume|thaw)
+ /etc/rc.d/rc.g15daemon restart
+ ;;
+ hibernate)
+ /etc/rc.d/rc.g15daemon stop
+ ;;
+ esac
+fi