RFC - bootscript error reporting

IvanK. ivan at chepati.org
Tue Jan 27 20:58:11 PST 2004


Jeremy,

this is exactly what I have been doing, replacing the read with a
echo "Waiting 5 seconds before continuing..."
sleep 5


But I would suggest a different approach since we're discussing.  If fixing, 
let's make it right.

How about we actually pass the return value to print_error_msg inside rc, and 
maybe the script that rc was processing when the error occured.  We can 
assign different levels of importance to each script.  Something like 
IMPORTANCE={0-2} where 0 is non-crucial, don't even report it, 1 is 
important, report but continue and 2 critical, stop.   Maybe also a 3 that is 
fatal, shutdown and write a file to / something like /fatal so that if a 
reboot is attempted the first thing rc does is check if /fatal is present and 
refuse to continue.  I'm thinking a corrupted fs would warrant such an 
action.

So then, back to print_error_msg, we pass to it the name of the script and the 
return value and we decide based on the script's importance level what to do.

Just some crazy ideas, I know but hey, you asked :-)

So yes, this is a good thing (tm) that we're discussing bootscripts.

Oh, and since we are discussing, where do we stand on  static vs dhcp?  I 
remember there was a long thread, but at some point I got distracted and 
didn't see the end of it.  If there's an interest we should address this as 
well and I can offer my approach.  I'm sure there'll be a better one.

IvanK.

On Tuesday 27 January 2004 06:17 pm, Jeremy Utley wrote:
> As the new co-maintainer of the lfs-bootscripts package, I'd like to get
> the community's input on what I feel is a fairly serious problem with
> the LFS-bootscripts - that is the hanging of the bootscripts when an
> error is encountered.  We've all seen it before:
>
> You should not be seeing this message! blah blah
>
> Press Enter to continue.
>
> This poses 2 problems - first, if the machine is unattended, this will
> hang the reboot process.  Second, previous reports list that
> occasionally hitting the enter key doesn't do the RightThing (TM) with
> regard to this.  I propose to make the default bootscripts replace this
> with a pause of a reasonable duration (5-10 secs), and then continue on
> with the process.  The worst case if this is done that *I* personally
> can think of is that some filesystems may not be properly unmounted on
> the reboot, and might need to be fscked after the reboot.  It still,
> however, gives the user who's watching the bootscripts proceed to see
> the error that occured, and look into the problem when the system comes
> back up.
>
> Anyone see any major flaws with doing this?
>
> -J-




More information about the lfs-dev mailing list