diff --git a/createhdds.py b/createhdds.py index 156398e..02502d2 100755 --- a/createhdds.py +++ b/createhdds.py @@ -140,6 +140,8 @@ class GuestfsImage(object): # do the write: the dict must specify the target path # and the string to be written ('content') gfs.write(write['path'], write['content']) + gfs.sync() + gfs.umount_opts("/") # do file 'uploads'. in guestfs-speak that means transfer # a file from the host to the image, we use it to mean # download a file from an http server and transfer that @@ -163,6 +165,8 @@ class GuestfsImage(object): gfs.mount(partn, "/") gfs.upload(tmpfname, upload['target']) os.remove(tmpfname) + gfs.sync() + gfs.umount_opts("/") # we're all done! rename to the correct name os.rename(tmpfile, self.filename) except: diff --git a/hdds.json b/hdds.json index 6a11bde..8c1877d 100644 --- a/hdds.json +++ b/hdds.json @@ -54,6 +54,7 @@ { "name" : "ks", "size" : "100M", + "imgver" : "2", "parts" : [ { "filesystem" : "ext4", @@ -67,6 +68,16 @@ "part" : "1", "target" : "/root-user-crypted-net.ks", "source" : "https://jskladan.fedorapeople.org/kickstarts/root-user-crypted-net.ks" + }, + { + "part" : "1", + "target" : "/freeipa.ks", + "source" : "https://www.happyassassin.net/ks/oqipas.ks" + }, + { + "part" : "1", + "target" : "/freeipaclient.ks", + "source" : "https://www.happyassassin.net/ks/oqipac.ks" } ] },