Le 18/05/16 à 13:42, Michael Tokarev a écrit :
[ http://bugs.debian.org/795486 ]

The attached patch is installing a systemd .service and a dbus configuration 
file and the resulting package is installing fine in a VM with the needed 
channel added (the daemon defaults to the virtio channel).

BUT it is not working properly if it's installed outside of a VM or in a VM 
without the correct channel. This is because the .service want the virtio 
channel to be present and will fail if it's not.
Hm.  I don't understand.  If a .service wants some other service,
what's the problem if it will not start?
Not sure what you mean here, if the service fails to start, the postinst script will fail too.


We should be able to tell dh_installinit to not start a service if systemd is 
PID1 (see: #804332) or bypass dh_installinit completely and start try to start 
the service only if we are not using systemd.
But I've one more question. If we're running under systemd, where
the service file will actually work properly, should we disable
/etc/init.d/qemu-guest-agent entirely from starting, not only at
install time?

Well no, the LSB initscript is masked by the systemd .service. The .service file is not installed in any target so it's not started at boot, only activated if udev detects the channel.

OTHO, the postinstall script explicitly starts the service and is not relying on udev to do so if it detects the channel.


Thanks,

/mjt

Reply via email to