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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...