Changeset 28950


Ignore:
Timestamp:
2011-11-11T16:46:36+01:00 (6 years ago)
Author:
nico
Message:

packages/fanctrolled: use new service functions

Location:
packages/utils/fancontroled
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/fancontroled/Makefile

    r24070 r28950  
    11# 
    2 # Copyright (C) 2010 OpenWrt.org 
     2# Copyright (C) 2010-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v3. 
     
    1010PKG_NAME:=fancontroled 
    1111PKG_VERSION:=0.1 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar 
  • packages/utils/fancontroled/files/fancontroled.init

    r24070 r28950  
    33START=75 
    44STOP=75 
     5 
     6SERVICE_NAME="fancontroled" 
     7SERVICE_COMMAND="/usr/sbin/$SERVICE_NAME" 
     8SERVICE_PID_FILE="/var/run/$SERVICE_NAME.pid" 
    59 
    610TEMP_SENSOR_CHIP=lm75 
     
    1216PWM_FAN_MIN=1 
    1317PWM_FAN_MAX=180 
    14 PID_FILENAME=/var/run/fancontroled.pid 
    1518 
    1619start() { 
    17         /usr/sbin/fancontroled -t $TEMP_SENSOR_CHIP -r $TEMP_READ_FIELD -m $MIN_TEMP -M $MAX_TEMP -f $FAN_SENSOR_CHIP -c $FAN_CONTROL_FIELD -p $PWM_FAN_MIN -P $PWM_FAN_MAX -z $PID_FILENAME 
     20        service_start $SERVICE_COMMAND -t $TEMP_SENSOR_CHIP -r $TEMP_READ_FIELD -m $MIN_TEMP -M $MAX_TEMP -f $FAN_SENSOR_CHIP -c $FAN_CONTROL_FIELD -p $PWM_FAN_MIN -P $PWM_FAN_MAX -z $SERVICE_PID_FILE 
    1821} 
    1922 
    2023stop() { 
    21         kill $(cat $PID_FILENAME) 
     24        service_stop $SERVICE_COMMAND 
    2225} 
Note: See TracChangeset for help on using the changeset viewer.