LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   help with simple startup script - missing LSB fields (https://www.linuxquestions.org/questions/debian-26/help-with-simple-startup-script-missing-lsb-fields-891615/)

tux-junkie 07-13-2011 09:19 PM

help with simple startup script - missing LSB fields
 
i wrote a simple script to execute a command on startup:

Code:

#! /bin/bash
# setterm
setterm -powerdown 0 -blank 0

i named the file 'setterm.sh' and used 'chmod 700' to make it executable and, as root, moved it to /etc/init.d. next, i ran the command 'update-rc.d -f setterm.sh start 99 2 3 4 5' and got an error message telling me the script was missing LSB fields. i did some research and understand what the fields are, but i don't understand how to use them for this script. can someone help me with this?

andrewthomas 07-13-2011 10:53 PM

Just put your code in rc.local, that's what it's for.

tux-junkie 07-13-2011 11:37 PM

i figured out why it wasn't working. i had to use
Code:

update-rc.d -f rc.local start 99 2 3 4 5 .
before the script would run after putting it in rc.local. thanks!

andrewthomas 07-14-2011 08:41 AM

You're welcome.

Glad to be of help.


All times are GMT -5. The time now is 04:49 AM.