mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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 both the systemd service and the SysV one to guestfs-firstboot: the new name is less generic, and allows the systemd service to be shadowed by the SysV service (and thus running just once). Also cleanup the old services: the old SysV service can be removed directly, since its former name had "virt-sysprep" in it, and so there could not be much room for confusion and conflict. Regarding the old systemd service: to avoid leaving it 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.