LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 06-22-2010, 11:59 AM   #1
gusblake
LQ Newbie
 
Registered: Feb 2010
Posts: 24

Rep: Reputation: 15
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
 
Old 06-22-2010, 04:17 PM   #2
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
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.
 
Old 06-23-2010, 04:50 PM   #3
gusblake
LQ Newbie
 
Registered: Feb 2010
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks; that was exactly it.
 
  


Reply

Tags
chkconfig, script, startup


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do /rc.d scripts get executed? mfoley Slackware 6 10-04-2009 11:10 AM
How can an object file be executed without startup and housekeeping? Lawand Programming 3 09-23-2009 01:37 AM
Kill scripts not being executed upon reboot druidmatrix Red Hat 9 02-17-2009 08:03 PM
RHEL3: init scripts aren't executed dabang Red Hat 2 01-04-2007 07:54 AM
Simple script to be executed on startup. Korff Linux - General 2 06-03-2003 09:25 PM


All times are GMT -5. The time now is 10:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration