Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-07-2004, 12:05 PM   #1
LQ Newbie
Registered: May 2004
Posts: 1

Rep: Reputation: 0
help with init script output


Anybody, please help:

I'm writing a init script to go on RedHat distros, that upon each boot, monitors the state of a driver and performs a build or corrections as needed.

Anyway... the problem is I don't understand how screen output works in the environment an init script is in.

I mean, I have a init script something like this:


runlevel=$(set -- $(runlevel); eval "echo \$$#")
current_kernel=$(uname -r)

case "$1" in
echo -n $"Starting $prog: HELLO! "

# Forcing a failure to stderr
# echo " "

# If a nVIDIA card is installed...
if [ $( grep -qi nvidia /proc/pci && echo 1 || echo 0 ) = 1 ]
#if driver is not installed...
if [ ! -f /usr/bin/nvidia-installer ]
echo "Configuring nVIDIA accelerated driver..."

My problem is that I want my 'echo's to show up on the screen during boot, and the crazy thing is that I have two versions of this script, one that works, echos out the "Sarting nvconfig: HELLO!" and "Configuring nVIDIA ..." and one script that doesn't. The CRAZY thing is the only difference between the two, is that the script that doesn't work is missing the two commented out lines: # Forcing ... and # echo " "

Can anyone explain what's going on? How can I make sure my echo's and stderr output goes the screen?



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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo X server freezes /var/lib/init.d/ files input output error bendeg Linux - Software 0 12-01-2005 05:01 AM
How to write init script shahrokhnikou Programming 4 10-24-2005 03:08 PM
can't get my init script working nukeu666 Linux - Newbie 4 12-16-2004 11:12 AM
eth0 output on init radix Slackware 3 03-11-2003 03:19 PM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 07:21 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:40 AM.

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