[arch-commits] CVS update of arch/build/system/lm_sensors (fancontrol.rc)

andyrtr at archlinux.org andyrtr at archlinux.org
Tue Aug 21 16:13:57 UTC 2007


    Date: Tuesday, August 21, 2007 @ 12:13:57
  Author: andyrtr
    Path: /home/cvs-arch/arch/build/system/lm_sensors

   Added: fancontrol.rc (1.1)

x86_64: fix lib location/added missing files for lm_sensors and nano


---------------+
 fancontrol.rc |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)


Index: arch/build/system/lm_sensors/fancontrol.rc
diff -u /dev/null arch/build/system/lm_sensors/fancontrol.rc:1.1
--- /dev/null	Tue Aug 21 12:13:57 2007
+++ arch/build/system/lm_sensors/fancontrol.rc	Tue Aug 21 12:13:57 2007
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/fancontrol`
+case "$1" in
+  start)
+    stat_busy "Starting fancontrol"
+    [ -z "$PID" ] && /usr/sbin/fancontrol
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      add_daemon fancontrol
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping fancontrol"
+    [ ! -z "$PID" ]  && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon fancontrol
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"  
+esac
+exit 0




More information about the arch-commits mailing list