• R/O
  • HTTP
  • SSH
  • HTTPS

image-creator: Commit

KVM host image creator.


Commit MetaInfo

Révision57e87cb0fbbf96dc780bf15b4dc84573dbe1e45e (tree)
l'heure2019-10-21 12:15:24
AuteurTatsuki SUGIURA <sugi@osdn...>
CommiterTatsuki SUGIURA

Message de Log

Continue event if rsync errors.

Change Summary

Modification

--- a/create-image
+++ b/create-image
@@ -100,7 +100,9 @@ class ImageCreator
100100 begin
101101 system("mount", dev, mount_point) or raise "Failed to mount file system #{dev} on #{mount_point}"
102102 puts "Copying #{src_host}:#{di.srcpath} to #{dev}..."
103- system("rsync", "-azHSAX", "--numeric-ids", "--info=progress2", "#{src_host}:#{di.srcpath}/", "#{mount_point}/", *((["--exclude"] * di.exclude.size).zip(di.exclude).flatten)) or raise "rsync fails"
103+ unless system("rsync", "-azHSAX", "--numeric-ids", "--info=progress2", "#{src_host}:#{di.srcpath}/", "#{mount_point}/", *((["--exclude"] * di.exclude.size).zip(di.exclude).flatten))
104+ warn "rsync exit with error, file transfer may not be completed."
105+ end
104106 ensure
105107 system("umount", mount_point)
106108 File.directory?(mount_point) and
Afficher sur ancien navigateur de dépôt.