Jump to content

problem with stdout in rc.local script


Guest bradymiller
 Share

Recommended Posts

Guest bradymiller

hey,

I've put a script into /etc/rc.d/rc.local, which is run on start-up. My script is several minutes long and contains some stdout commands(via echo commands), so the user doesn't think the startup has frozen. The problem is they don't display during the script, but i do see them flicker on the display right before it shows the intro screen (/etc/issue). To further clarify, I've set startup to verbose, and my runlevel to 3. To debug this I've inserted many echo, printf, and gprintf commands into the rc.local file with interspersed sleep commands, and they all seem to be held in a buffer and are not displayed until script is finished, and then see them all for a split-second before the intro screen(/etc/issue) is displayed.

Anybody have any thoughts on this?

thanks,

Brady

 

BTW: using Mandriva 2008

Edited by bradymiller
Link to comment
Share on other sites

Hi Brady,

 

welcome to Mandrivausers!

 

Regarding your script, I'd consider a better fitting solution to integrate within the boot process. Do you actually need your script to be run from rc.local? Probably you'll get a better result when you redesign it to run as a "normal" start script from /etc/init.d. As have noticed, most of these give user feedback during execution, and it seems to pose no problem to display more than a single line of text (as the shorewall service does here, for example).

 

HTH,

 

scoonma

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...