It seems that /sbin/init from upstart does not care about utmp at all.
(Note that mingetty(8) and login(1) can create a new utmp entry on systems
where init(8) is broken, but init(8) has to set the entry to DEAD_PROCESS
state when user logout and login process has exited).
See utmp man page:
The first entries ever created result from init(8) processing inittab(5).
Before an entry is processed, though, init(8) cleans up utmp by setting
ut_type to DEAD_PROCESS, clearing ut_user, ut_host, and ut_time with null
bytes for each record which ut_type is not DEAD_PROCESS or RUN_LVL and where
no process with PID ut_pid exists. If no empty record with the needed ut_id
can be found, init(8) creates a new one. It sets ut_id from the inittab,
ut_pid and ut_time to the current values, and ut_type to INIT_PROCESS.
mingetty(8) (or agetty(8)) locates the entry by the PID, changes ut_type to
LOGIN_PRO- CESS, changes ut_time, sets ut_line, and waits for connection to be
established. login(1), after a user has been authenticated, changes ut_type
to USER_PROCESS, changes ut_time, and sets ut_host and ut_addr. Depending on
mingetty(8) (or agetty(8)) and login(1), records may be located by ut_line
instead of the preferable ut_pid.
When init(8) finds that a process has exited, it locates its utmp entry by
ut_pid, sets ut_type to DEAD_PROCESS, and clears ut_user, ut_host and ut_time
with null bytes.
It seems that /sbin/init from upstart does not care about utmp at all.
(Note that mingetty(8) and login(1) can create a new utmp entry on systems
where init(8) is broken, but init(8) has to set the entry to DEAD_PROCESS
state when user logout and login process has exited).
See utmp man page:
The first entries ever created result from init(8) processing inittab(5).
Before an entry is processed, though, init(8) cleans up utmp by setting
ut_type to DEAD_PROCESS, clearing ut_user, ut_host, and ut_time with null
bytes for each record which ut_type is not DEAD_PROCESS or RUN_LVL and where
no process with PID ut_pid exists. If no empty record with the needed ut_id
can be found, init(8) creates a new one. It sets ut_id from the inittab,
ut_pid and ut_time to the current values, and ut_type to INIT_PROCESS.
mingetty(8) (or agetty(8)) locates the entry by the PID, changes ut_type to
LOGIN_PRO- CESS, changes ut_time, sets ut_line, and waits for connection to be
established. login(1), after a user has been authenticated, changes ut_type
to USER_PROCESS, changes ut_time, and sets ut_host and ut_addr. Depending on
mingetty(8) (or agetty(8)) and login(1), records may be located by ut_line
instead of the preferable ut_pid.
When init(8) finds that a process has exited, it locates its utmp entry by
ut_pid, sets ut_type to DEAD_PROCESS, and clears ut_user, ut_host and ut_time
with null bytes.
Reassignig to upstart.