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 \$$#")
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?