summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Snelham <zeypher@gentoo.org>2006-11-08 20:21:06 +0000
committerMatthew Snelham <zeypher@gentoo.org>2006-11-08 20:21:06 +0000
commita7c1359e984d5039161a8c4d2b1df8fb4c11adc8 (patch)
tree96dcc0c426ae35d11155ff6ef8ca5ad08f7c82a1 /sys-apps/apparmor-parser/files/rc.helper.functions
downloadzeypher-a7c1359e984d5039161a8c4d2b1df8fb4c11adc8.tar.gz
zeypher-a7c1359e984d5039161a8c4d2b1df8fb4c11adc8.tar.bz2
zeypher-a7c1359e984d5039161a8c4d2b1df8fb4c11adc8.zip
Initial import of AppArmor ebuilds, October release.
svn path=/; revision=1
Diffstat (limited to 'sys-apps/apparmor-parser/files/rc.helper.functions')
-rw-r--r--sys-apps/apparmor-parser/files/rc.helper.functions47
1 files changed, 47 insertions, 0 deletions
diff --git a/sys-apps/apparmor-parser/files/rc.helper.functions b/sys-apps/apparmor-parser/files/rc.helper.functions
new file mode 100644
index 0000000..692414e
--- /dev/null
+++ b/sys-apps/apparmor-parser/files/rc.helper.functions
@@ -0,0 +1,47 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+waserror=0
+
+function sd_action() {
+ MSG=$1
+ shift
+ #echo "ACTION: $*"
+ $* > /dev/null
+ rc=$?
+ if [ $rc -ne 0 ] ; then
+ sd_log_failure_msg $"$MSG"
+ else
+ sd_log_success_msg $"$MSG"
+ fi
+ return $rc
+}
+
+function sd_log_info_msg() {
+ einfo " $*"
+}
+
+function sd_log_warning_msg() {
+ ewarn " $*"
+}
+
+function sd_log_success_msg() {
+ einfo " $*"
+ eend 0
+}
+
+function sd_log_failure_msg() {
+ waserror=1
+ einfo " $*"
+ eend 1
+}
+
+function startproc() {
+ /sbin/start-stop-daemon --start -p $3 --exec $4 -- -p $3
+}
+
+function killproc() {
+ /sbin/start-stop-daemon --stop -p $3
+}
+