Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rusjako:eeePC
eeeFancontrol
eee-fancontrol.init
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File eee-fancontrol.init of Package eeeFancontrol
#! /bin/sh # # Copyright (c) 2008 Stefan Jakobs # Author: Stefan Jakobs # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # based on the template by SuSE Linux # # /etc/init.d/eee-fancontrol # ### BEGIN INIT INFO # Provides: eee-fancontrol # Required-Start: $remote_fs # Should-Start: $null # Required-Stop: $null # Should-Stop: $null # Default-Start: 1 3 5 # Default-Stop: 0 2 6 # Short-Description: eee-fancontrol controlls the eeePC fan # Description: eee-fancontrol will load a kernel modul for the # ASUS eeePC which provides access to the fan controlls. It will # also start the script eee-fancontrol which will then control the # fan speed dependable on the temperature. ### END INIT INFO FANCTRL_SCRIPT=/usr/sbin/eee-fancontrol.pl if [ ! -x $FANCTRL_SCRIPT ]; then echo "The fancontrol script does not exist or is not executable!" exit 5 fi if ! lsmod | grep eee > /dev/null ; then if ! $( /sbin/modprobe eee ) ; then echo "Kernel module eee is missing!" exit 5 fi fi # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num><num> # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status . /etc/rc.status # Reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - insufficient privilege # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signalling is not supported) are # considered a success. case "$1" in start) echo -n "Starting eee-fancontrol " /sbin/startproc $FANCTRL_SCRIPT # Remember status and be verbose rc_status -v ;; stop) echo -n "Stopping eee-fancontrol " #killall -q eeepc-fancontrol /sbin/killproc -TERM $FANCTRL_SCRIPT # Remember status and be verbose rc_status -v ;; restart|reload) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; status) echo -n "Checking for eee-fancontrol " /sbin/checkproc $FANCTRL_SCRIPT # Remember status and be quiet rc_status -v ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 ;; esac rc_exit
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor