postrm "systemctl start" call ignores policy-rc.d
Bug #1771994 reported by
Robie Basak
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
chrony (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
I'm not sure if this bug is valid.
In the review of Christian's chrony merge, I noticed that the postrm calls "systemctl start systemd-timesyncd". This is conditioned on a "systemctl is-enabled".
It isn't clear to me how systemd is supposed to interact with policy-rc.d now. If a user has disabled systemd-timesyncd via policy-rc.d only, will this violate policy by starting it? If so, what's the correct way to make the call? I'd have used "invoke-rc.d ..." in the past, but I'm not sure what the correct mechanism is with systemd.
Related branches
~paelzer/ubuntu/+source/chrony:merge-disco-3.4
- Andreas Hasenack: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 516 lines (+374/-5)11 files modifieddebian/README.container (+60/-0)
debian/changelog (+193/-0)
debian/chrony.conf (+18/-1)
debian/chrony.default (+4/-0)
debian/chrony.service (+2/-2)
debian/chronyd-starter.sh (+70/-0)
debian/control (+4/-1)
debian/docs (+1/-0)
debian/install (+1/-0)
debian/links (+5/-0)
debian/postrm (+16/-1)
Changed in chrony (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
To post a comment you must log in.
I created a dummy /usr/sbin/ policy- rc.d file that echoed to /tmp/andreas the command line arguments it got, and no /tmp file was created when I ran "systemctl restart systemd-timesyncd".
With "invoke-rc.d systemd-timesyncd restart", however, I got: policy- rc.d invoked
root@nsnx:~# cat /tmp/andreas
/usr/sbin/
arguments: systemd-timesyncd restart 5
So systemctl bypassed policy-rc.d, whereas invoke-rc.d does not.