upstart config files

Asked by Danny Sung

Does anyone have any example config files they can send me, especially ones that chain events. I can't seem to find much in the way of documentation regarding these event files.

If I understand correctly, the main entrypoint to upstart is /etc/event.d/. I've created a console login that does appear to work, but for some reason isn't respawning on exit. Here's my current code:

ttyS0:
   start on startup
   stop on runlevel 0
   stop on runlevel 1
   stop on runlevel 6

   exec /sbin/getty -L ttyS0 115200 vt100
   respawn

I'd like to have this enabled after a few system things happen, though. eg. If I create a "system_init" file that mounts file systems, can ttyS0 then say "start on stopped system_init". Or does my "system_init" need to emit an event?

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
upstart Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Danny Sung (dannys) said :
#2

how do I unexpire this? Someone tells me they may have an answer, but can't post.

Revision history for this message
oz (shamaniacwizardfromoz) said :
#3

if system_init is being really stopped at all, "start on stopped system_init" should work without any events being emitted. But i think it won't be stopped, therefore "start on started system_init" can do the job, if it is not beend triggered too early.

It may not respawn, if the process remains running.
Try killing it or try a different command and watch if it is respawned.
You can also try to put the "exec" line behind the "respawn" line, just to make sure.

Can you help with this problem?

Provide an answer of your own, or ask Danny Sung for more information if necessary.

To post a message you must log in.