postfix started in single user mode during upgrade

Bug #1320415 reported by Phillip Susi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I shutdown my server to single user mode and ran a dist-upgrade. The postfix postint started the daemon, even though it is not supposed to be running in single user mode.

Revision history for this message
Phillip Susi (psusi) wrote :

Just created a fresh install of 13.10 in a vm, swapped /etc/apt/sources.list to trusty, shutdown to single user mode, confirmed with runlevel that the system was in single user mode, and ran apt-get install postfix to upgrade it, and sure enough, it it started postfix.

Changed in postfix (Ubuntu):
status: New → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

It looks like the problem is in invoke-rc.d: manually running invoke-rc.d postfix restart, while in single user mode, starts postfix.

affects: postfix (Ubuntu) → sysvinit (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

When you say "single user mode", is that runlevel 1 or runlevel S?

I can confirm that, because update-rc.d creates a K link for postfix in /etc/rc1.d, but not in /etc/rcS.d, invoke-rc.d will not detect a "policy" for the init script in runlevel S and will assume that it should take the requested action.

It's probably a good idea to file this bug upstream with Debian; I doubt we want to diverge from upstream on this corner case, considering how hairy the code is.

Revision history for this message
Phillip Susi (psusi) wrote :

I'm a little confused. I thought that runlevel S was a pseudo runlevel that only ever contained S links that were only called during initial boot, no matter what runlevel you were going to, and that a shutdown or booting with the 's' argument transitioned you to runlevel 1. As such, update-rc.d isn't supposed to create a K link in /etc/rcS.d, since the rc scripts would never use it.

invoke-rc.d has this comment:

### LOCAL INITSCRIPT POLICY: Enforce need of a start entry
### in either runlevel S or current runlevel to allow start
### or restart.

That seems pretty clear: there is no S link for postfix in either rcS.d nor rc1.d, so it shouldn't be starting it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.