Where is default runlevel set for upstart in lucid?

Asked by Christian Hudon on 2011-09-14

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

English Edit question
Ubuntu upstart Edit question
No assignee Edit question
Solved by:
Christian Hudon
Last query:
Last reply:

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/

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.

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

Christian Hudon (chrish) said : #4

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

Christian Hudon (chrish) said : #5

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