Quoting Clint Byrum ([email protected]): > In this bug report that I raised 
against upstart in Ubuntu, I suggest
> (at the urging of Oliver Grawert and Emmet Hikory) that we add a job to
> the upstart package which starts a serial console if the kernel has been
> asked to start a serial console.
> 
> https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/702574
> 
> Scott recommended in the merge proposal attached there that we discuss
> how upstart can provide console handling rather than leaving it all to a
> job file.
> 
> As I read it, the kernel has been patched to provide kernel arguments as
> environment variables if they are specified as  foo=bar. So
> console=ttyS0,38400 would end up as an environment varialble "console"
> with the value of "ttyS0,38400", for init only.
> 
> I've given this some thought, and I was thinking maybe we could have
> upstart fire an event:
> 
> console-redirected
> 
> Which could then be used for, say, the serial port case:
> 
> start on console-redirected CONSOLE_TTY=ttyS* and filesystem
> 
> exec getty /dev/$CONSOLE_TTY $CONSOLE_ARGS
> 
> Thoughts? 

How about just having /etc/init/serial.conf say:

start on startup

env console
pre-start script
        [ -z $console ] && stop
end script

script
        # some ugly processing to get the console args from $console
        # followed by an appropriate getty call...
end script

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to