smbd/nmbd don't restart after upgrade if started but disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
If smbd and nmbd are started and running but their service is disabled, and an apt-get upgrade is performed which updates samba/samba-common, at the end of the upgrade the smbd and nmbd daemons will not be running anymore.
Distribution: Ubuntu 16.04
Pre-upgrade version: 4.3.8+dfsg-0ubuntu1
Post-upgrade version: 4.3.11+
What I expected to happen:
After the dist-upgrade, since smbd and nmbd services were running, they should have been started again
What happened instead:
smbd and nmbd services are inactive.
The problem doesn't arise if the service is enabled; I suppose that somewhere after the upgrade, the samba package queries for the global unit enablement status rather than the unit status before the upgrade; this is especially problematic with unattended-
I can confirm this behavior in xenial, but to be honest I'm not sure what's the correct expected outcome.
Can you perhaps accomplish something similar using /usr/sbin/ policy- rc.d? You can create that script and it would check if samba is the service being started, and then check if the disk you need is verified and decrypted, and do nothing otherwise.
See this bug and its comments 7 and 8 for an example: https:/ /bugs.launchpad .net/ubuntu/ +source/ freeradius/ +bug/1712817
Would that work for you?