Holger Levsen wrote: > Bob Proulx wrote: > > The introduction of systemctl is problematic especially when used in > > chroots. > > systemctl handles chroots, so can you elaborate on this?
The policy-rc.d layer was created so that dpkg upgrading packages in chroots don't start daemons in the chroot that might be installed in the chroot but for which we don't want them to be running in the chroot. Unless we do. In either case we can control that using the policy-rc.d layer which is entered through the invoke-rc.d command. Therefore packaged actions such as from postinst and logrotate.d and should call through invoke-rc.d which might do nothing if policy-rc.d has been configured for them to do nothing. So that upgrading packages in a chroot won't start daemons there. [[Aside: Strangely the policy-rc.d layer controls a running system but not a booting system. An init system booting ignores the policy-rc.d layer entirely. I have seen systems, mostly virtualized, incorrectly configured with a policy-rc.d that prevents upgrades from (re)starting daemons but that boot and reboot okay. But then upgrades don't restart daemons due to the mistaken configuration. I think that is a hole in the design but a minor one that mostly is never encountered. Except I encountered it. Too funny!]] In my case I noticed because I don't have any init system installed within reach at all. It's a very special case. But useful. So for me on the upgrade it produced errors from calling systemctl and not finding it. So I knew immediately. Which was a useful mine-canary. > > Please use invoke-rc.d like other logrotate.d files do. Here is a > > patch. > > thank you, applied to the debian branch, so it will be included in the > upcoming 2.0.74-1 upload. Excellent! Thank you! > > I note that TABs were used and that those will probably not be > > preserved and will need to be manually handled as desired. > > where? The /etc/logrotate.d/munin-node file contains TAB characters. I was careful that my email preserved those. But if one copy-pasted out of there probably will convert those TABs to spaces depending upon mail client, terminal emulator, desktop manager, X/Wayland, and so forth. So many possibilities! Certainly if one looks at the web page of the bug ticket and copy-pasted from there for example the -/+ lines would only have been converted to spaces at that point. Or your flow might preserve them naturally. When I am in emacs reading the mail message and then copy the text then the TABs will be preserved from the original into the copy. Emacs FTW! :-) Bob