Linux – Identify if server boots using upstart or sysvinit

linuxupstart

I am a not a experienced linux user/admin, but last week I acquired a raspberry, and installed on it a Raspbmc, based on Debian distro.

I am having some troubles trying to identify which scripts the distro is using for services, I know that there are the init.d scripts determined on specific runlevels (rc0.d, rc1.d etc..)

And I must state that I am a bit confused about it.

My question is, when I have init .conf files for upstart, the rc0123456.d files still are valid ? the boot respects only one at time (upstart or sysvinit) or both at same time?

And how can I identify which one is being used?

Thanks!

Best Answer

On debian, you will have sysv scripts, Upstart jobs, and systemd services all installed at once. With Upstart and systemd, the jobs/services will be used if available, and the sysv scripts will be run if no Upstart or systemd jobs/services are available.

This command returning success means Upstart was booted:

test -x /sbin/initctl && /sbin/initctl --version | grep -q upstart || false

This command returning success means systemd was booted:

test -d /run/systemd/system

Otherwise, you are on sysvinit.

Related Question