• R/O
  • HTTP
  • SSH
  • HTTPS

image-creator: Commit

KVM host image creator.


Commit MetaInfo

Revision5f490af6e4ff89322e3850114a6ed056515a9bba (tree)
Zeit2020-06-28 21:16:42
AutorTatsuki SUGIURA <sugi@osdn...>
CommiterTatsuki SUGIURA

Log Message

Fix rewriting loopback device name on grub config.

Ändern Zusammenfassung

Diff

--- a/create-image
+++ b/create-image
@@ -167,7 +167,7 @@ class ImageCreator
167167 system("chroot", dir, "grub-mkconfig", "-o", "/boot/grub/grub.cfg") or raise "grub-mkconfig fails."
168168 system(*%W(grub-install --no-floppy --grub-mkdevicemap=#{dir}/boot/grub/device.map --root-directory=#{dir} #{root_dev})) or raise "grub-install failed."
169169 cfg = File.read "#{dir}/boot/grub/grub.cfg"
170- cfg.gsub! %r{mapper/loop0p}, "sda"
170+ cfg.gsub! %r{mapper/loop\d+p}, "sda"
171171 File.write "#{dir}/boot/grub/grub.cfg", cfg
172172
173173 unless Array(run_cmds).empty?
Show on old repository browser