Where is default runlevel set for upstart in lucid?

Asked by Christian Hudon

I'd like to know where the default runlevel used by upstart (for the upstart .conf files that use a runlevel event) in lucid is set? Some googling yielded only information for very old versions of upstart. Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Christian Hudon
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

In Ubuntu all runlevels except 0,1 and 6 are by default equal. Also keep in mind that Ubuntu now uses Upstart instead of System V init so there is normally no /etc/inittab.

Upstart is meant to replace the old Sys V Init system with an event-driven init model. For more information please see: http://upstart.ubuntu.com/

Revision history for this message
Christian Hudon (chrish) said :
#2

Yes, I understand and am aware of this. But there is still a "runlevel" event in upstart, which is used to start some jobs. I am debugging a problem with one such job, and need to know where and when the "runlevel" even is generated during boot with upstart on lucid. And presumably somewhere on disk (in /etc?) there is a file with tells upstart to generate a "runlevel 2" event by default (if nothing else is specified on the kernel's command-line). Where is that file? Thanks.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

in /etc there is:

rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rcS.d/

Each one will manage the level

Revision history for this message
Christian Hudon (chrish) said :
#4

Yes, but where is the actual runlevel used by upstart set?

Revision history for this message
Christian Hudon (chrish) said :
#5

I found the answer. It's set in the file "/etc/init/rc-sysinit.conf", environment variable "DEFAULT_RUNLEVEL".