0

We are planning to migrate from an older version of Ubuntu to (10.x) to the latest release of Amazon Linux. I'm trying to identify how to replicate the K and S scripts in the rc0.d, rc1.d etc directories.

My question is, how to determine which is the default level?

There is no /etc/inittab, and the man page says it's been replaced by files in /etc/init. But they rcx.d directories contains references to specific apps within our system, while the /etc/init contains a bunch of .conf files. I'm thinking this somehow points to the rcx.d directories, perhaps via the rc.conf, rcS.conf or rc-sysinit.conf but can't lock down the actual startup level.

1
  • Ubuntu uses Upstart now, so most of the old school scripts have been replaced with Upstart jobs (the .conf files you saw). Upstart still supports the old ways, so you can continue using the rc directories. To determine the current runlevel, use the runlevel command, the default is 2.
    – muru
    Mar 19, 2015 at 17:45

1 Answer 1

1

Ubuntu has replaced the traditional SysV init with Upstart. To somewhat stay compatible with SysV or runlevel based init, Upstart still supports the SysV traditions.

You can find (and change) the default runlevel in the /etc/init/rc-sysinit.conf file. The following command will do:

$ grep "env DEFAULT_RUNLEVEL" /etc/init/rc-sysinit.conf 
env DEFAULT_RUNLEVEL=2

As you can see the default runlevel is 2, you can also change it to your desired runlevel.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .