summaryrefslogtreecommitdiff
path: root/community-testing/catalyst-utils/atieventsd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-09-24 00:22:59 -0700
committerroot <root@rshg054.dnsready.net>2012-09-24 00:22:59 -0700
commit8f0a971364bf8fee254a13a94adf2bfa9173e804 (patch)
tree8b25f3fa8cb2e7b6b61d26a667d5f6e3ad967b70 /community-testing/catalyst-utils/atieventsd
parenta7f8166c8968d3414378051d28dcfcc3e377837b (diff)
Mon Sep 24 00:22:58 PDT 2012
Diffstat (limited to 'community-testing/catalyst-utils/atieventsd')
-rw-r--r--community-testing/catalyst-utils/atieventsd41
1 files changed, 41 insertions, 0 deletions
diff --git a/community-testing/catalyst-utils/atieventsd b/community-testing/catalyst-utils/atieventsd
new file mode 100644
index 000000000..16bd9a4fa
--- /dev/null
+++ b/community-testing/catalyst-utils/atieventsd
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+ATID_PID=`pidof -o %PPID /usr/sbin/atieventsd`
+
+case "$1" in
+ start)
+ rc=0
+ stat_busy "Starting ATI Events Daemon"
+ [ -z "$ATID_PID" ] && /usr/sbin/atieventsd
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon atieventsd
+ stat_done
+ fi
+ ;;
+ stop)
+ rc=0
+ stat_busy "Stopping ATI Events Daemon"
+ kill $ATID_PID &>/dev/null
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon atieventsd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0