-   Fedora (
-   -   Startup scripts don't get executed (

gusblake 06-22-2010 11:59 AM

Startup scripts don't get executed

I have this script that I want to be run on startup:



#chkconfig: 5 80 20
#description: sets default screen brightness

smartdimmer -s 10

I copied this file into /etc/rc.d/init.d and made it executable, then ran


chkconfig --add defbrt
and the symbolic link appeared in /etc/rc.d/rc5.d.

When I execute the script manually from the command line, the screen brightness goes down to the right level, but it just doesn't happen on startup.

I have tried doing a simple script like


touch test

and manually copying it into the correct folder, but that doesn't work either.

What am I doing wrong? When I did this on Debian (with update-rc.d, but essentially the same result) it worked fine.


DrLove73 06-22-2010 04:17 PM

Try adding the full path to the executable file (smartdimmer), like

/usr/local/bin/smartdimmer -s 10
Crone for example has different enviroment settings (like $PATH). Maybe init works the same.

gusblake 06-23-2010 04:50 PM

Thanks; that was exactly it.

All times are GMT -5. The time now is 11:20 AM.