On Wednesday, 3 August 2016 16:39:46 CEST Richard W.M. Jones wrote:
On Wed, Aug 03, 2016 at 05:35:14PM +0200, Pino Toscano wrote:
Currently we install a systemd service named firstboot.service and a SysV service named virt-sysprep-firstboot. On systems where systemd is the init system and runs with the SysV compatibility, the different names make systemd handle them as different services, and thus trying to run the firstboot script runner twice.
Rename the systemd service to virt-sysprep-firstboot as well: other than being sligtly less generic, it is also shadowed by the SysV service, and thus run just once. To avoid leaving the old systemd service behind, a simple cleanup strategy is in place, checking the content of the old firstboot.service to really ensure we are removing one of our versions of this file.
Ok, but can we name it something other than 'sysprep'? eg. 'virt-firstboot.service' or 'guestfs-firstboot.service' or similar?
That will involve also renaming the SysV services, and I wanted to limit the amount of changes. However I can do that, if needed. -- Pino Toscano