Upstart was an init system created for Ubuntu to replace System V init. Red Hat Enterprise Linux 6 also used it. Ubuntu switched its default to systemd in release 15.04, and Upstart is now in maintenance mode with no new features. Learn it to maintain old machines, not for new work.
Events instead of a fixed order
SysV runs scripts one after another in a numbered sequence. Upstart is event-driven. Something happens, an event is emitted, and every job waiting for that event reacts.
Typical events include:
startup, emitted when Upstart beginsfilesystem, when filesystems are mounted (used on Ubuntu)runlevel, when the runlevel changesstartedandstopped, when other jobs change state
Because jobs wait only for what they need, independent jobs can start at the same time.
Jobs
A unit of work in Upstart is a job. Each job is described by a text file in /etc/init, ending in .conf. Note that this is not the same directory as SysV's /etc/init.d.
$ ls /etc/init
cron.conf networking.conf rsyslog.conf ssh.confLooking around with initctl
initctl talks to the Upstart daemon:
$ initctl list
cron start/running, process 912
ssh start/running, process 1043
tty1 stop/waitingEach line shows a goal, such as start or stop, then a state, such as running or waiting. The process ID appears when there is one.
initctl --version shows which Upstart version you have.
On a systemd system these commands are normally absent.
Compatibility with SysV
Upstart kept old init scripts working. It emits runlevel events, and a compatibility job runs the scripts in the matching rc directory. So a machine could have native jobs in /etc/init alongside older scripts in /etc/init.d.
Try it
If you have an old Ubuntu virtual machine, such as 14.04, run initctl list and read one file in /etc/init. Keep it off untrusted networks, since old releases may no longer get security fixes. Otherwise, run ps -p 1 -o comm= on your own system and note that it is probably not Upstart.
Check your understanding
Upstart Overview
All 4 sections ยท no timer
Unlimited retries
Questions from every section are combined into one assessment. Answer them all correctly to complete the article.
Your completion saves in this browser. Sign in to sync it to your account.