[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dbootstrap not respawned when killed



On Fri Nov 12, 1999 at 03:56:14PM +0100, Eric Delaunay wrote:
> 
> When dbootstrap is killed (manually or automatically after a segfault or the
> like), the first console is frozen.
> It is because dbootstrap is spawn from /etc/init.d/rcS and this script is only
> run once at boot time.
> The solution is not to rerun rcS because it contains other commands but maybe
> to support some kind of inittab or to hardcode dbootstrap as the first console
> program in init like it was in slink.
> I think we need dbootstrap to be respawn automatically after a kill for some
> kind of robustness, especially on serial console where there is no shell
> console to switch to to rerun dbootstrap by hand (it this case the system is
> frozen and I have to reboot it wildly).
> 
> Erik, what do you think about this?

Ok.  Something like this:
    for (;;) {
	...
  
	if (pid1 == 0 && tty0_commands) {
            pid1 = run(tty0_commands, console, wait_for_enter);
        }

	...
 
        if (wpid == pid1) {
            if (run_rc == FALSE) {
                pid1 = 0;
            }
            else {
                run_rc=FALSE;
                wait_for_enter=TRUE;
    #ifdef DBOOTSTRAP
                tty0_commands= { "dbootstrap", "dbootstrap" 0};
    #else
                tty0_commands=shell_commands;
    #endif
            }
        }

	...

	sleep(1);
    }
? so that the first time around we run the rc script,
but all subsequent time around the loop we run dbootstrap?

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--


Reply to: