LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Startup scripts don't get executed (http://www.linuxquestions.org/questions/fedora-35/startup-scripts-dont-get-executed-815703/)

gusblake 06-22-2010 11:59 AM

Startup scripts don't get executed
 
Hi,

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

Code:

#!/bin/bash

#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

Code:

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

Code:

#!/bin/bash
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.

Cheers,
Gus

DrLove73 06-22-2010 04:17 PM

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

/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:30 AM.