• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

KVM host image creator.Jessica Lockwood


Commit MetaInfo

Revisão324052eadf9f578b23c09867c0546f2859dc78a9 (tree)
Hora2020-06-28 23:42:38
AutorTatsuki SUGIURA <sugi@osdn...>
CommiterTatsuki SUGIURA

Mensagem de Log

Fix order to enable grub config rewrite.

Mudança Sumário

Diff

--- a/create-image
+++ b/create-image
@@ -166,15 +166,16 @@ class ImageCreator
166166 end
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."
169- cfg = File.read "#{dir}/boot/grub/grub.cfg"
170- cfg.gsub! %r{mapper/loop\d+p}, "sda"
171- File.write "#{dir}/boot/grub/grub.cfg", cfg
172169
173170 unless Array(run_cmds).empty?
174171 Array(run_cmds).each do |cmd|
175172 system({'DEBIAN_FRONTEND' => 'noninteractive'}, "chroot", dir, *Array(cmd)) or raise "Failed to execute command (#{cmd}): #{$!}"
176173 end
177174 end
175+
176+ cfg = File.read "#{dir}/boot/grub/grub.cfg"
177+ cfg.gsub! %r{mapper/loop\d+p}, "sda"
178+ File.write "#{dir}/boot/grub/grub.cfg", cfg
178179 ensure
179180 system("umount", "#{dir}/dev")
180181 system("umount", "#{dir}/proc")