LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 07-13-2011, 10:19 PM   #1
tux-junkie
Member
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Debian, Fedora
Posts: 35

Rep: Reputation: 0
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?
 
Old 07-13-2011, 11:53 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Just put your code in rc.local, that's what it's for.
 
Old 07-14-2011, 12:37 AM   #3
tux-junkie
Member
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Debian, Fedora
Posts: 35

Original Poster
Rep: Reputation: 0
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!
 
Old 07-14-2011, 09:41 AM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
You're welcome.

Glad to be of help.
 
  


Reply


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
Fields script... mmahulo Linux - Newbie 9 01-19-2009 02:28 AM
Need simple script to startup internet service? M$ISBS Programming 7 01-19-2008 12:20 AM
script for pasting fields in files bhandu Linux - Newbie 2 06-28-2007 08:20 AM
Building LSB compatible application with LSB SDK - lsbappchk fails gkiagia Programming 0 01-12-2007 06:00 AM
Simple script to be executed on startup. Korff Linux - General 2 06-03-2003 10:25 PM


All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
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