|
Oh, you can just modify your startup scripts to do that. If you look at the stuff in /etc/rc.d/ you will see the scripts contain lots of stuff like:
if [ -x /path/to/some_file ]; then
/path/to/some_file;
fi
You can just just change it to something like:
if [ -x /path/to/some_file ]; then
/path/to/some_file && echo "Starting some_file";
fi
If you want to print that your attempting to start the process, and then print another message to say whether or not it started successfully, you can just have a line - echo "Attempting to start some_file..." _before_ the line to run it, and then another nested if construct to test if it worked or not and print "done" or "fail" etc.
The method I mentioned above is simpler to implement and avoids the hassle with the method you want which will be complicated by the fact that programs often print some information of their own when started which may mess up your own output text.
|