[Libguestfs] [PATCH v2 3/4] customize: firstboot: Remove default.target.wants/guestfs-firstboot.service too.

Richard W.M. Jones rjones at redhat.com
Mon Jul 17 15:06:07 UTC 2017


This file could be left over from earlier use of the ‘--firstboot’
option.

Thanks: Pino Toscano.
---
 customize/firstboot.ml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/customize/firstboot.ml b/customize/firstboot.ml
index bd4f7850f..ddcb56271 100644
--- a/customize/firstboot.ml
+++ b/customize/firstboot.ml
@@ -146,7 +146,11 @@ WantedBy=%s
       | csum ->
         warning (f_"firstboot: unknown version for old firstboot.service file %s (md5=%s), it will not be removed")
           oldunitfile csum
-    )
+    );
+    (* And the old default.target.wants/guestfs-firstboot.service from
+     * libguestfs <= 1.37.17.
+     *)
+    g#rm_f "/etc/systemd/system/default.target.wants/guestfs-firstboot.service"
 
   and install_sysvinit_service g root distro major =
     match distro with
-- 
2.13.2




More information about the Libguestfs mailing list