Ask Your Question

valveur's profile - activity

2012-01-21 12:03:01 -0500 received badge  Editor (source)
2012-01-21 12:01:08 -0500 answered a question start script on boot fedora 16

Hi samuaz,

You 're in the good way but your shell script isn't right. Firstable read man chkconfig For example:

#! /bin/bash
#
# smcfancontrol fan control     
#
# chkconfig: 345 85 15
# description: Activates/Deactivates fan
#
### BEGIN INIT INFO
# Provides: <your info>
# Should-Start: <your info>
# Short-Description: <your info>
# Description: <your info>
### END INIT INFO

# Source function library.
. /etc/init.d/functions

# local
. /$HOME

# See how we were called.
case "$1" in
  start)
    echo "the script UP "
    <your fan service>
    ;;
  stop)
    echo "the script DOWN"
    # this is an exmaple
    pkill <your fan service>
    ;;
  *)
    echo "Usage: /etc/init.d/smcfancontrol {start|stop}"
    exit 1
    ;;
esac
exit 0

Then:

$ sudo chkconfig --level  345 85 15 smcfancontrol
$ sudo chkconfig --add smcfancontrol

And the last step, to check:

$ sudo chkconfig --list