1 Given /^I create a (\d+) ([[:alpha:]]+) disk named "([^"]+)"$/ do |size, unit, name|
2 next if @skip_steps_while_restoring_background
3 @vm.storage.create_new_disk(name, {:size => size, :unit => unit,
7 Given /^I create a ([[:alpha:]]+) label on disk "([^"]+)"$/ do |type, name|
8 next if @skip_steps_while_restoring_background
9 @vm.storage.disk_mklabel(name, type)
12 Given /^I create a ([[:alnum:]]+) filesystem on disk "([^"]+)"$/ do |type, name|
13 next if @skip_steps_while_restoring_background
14 @vm.storage.disk_mkpartfs(name, type)
17 Given /^I cat an ISO hybrid of the Tails image to disk "([^"]+)"$/ do |name|
18 next if @skip_steps_while_restoring_background
19 disk_path = @vm.storage.disk_path(name)
20 tails_iso_hybrid = "#{$tmp_dir}/#{File.basename($tails_iso)}"
22 cmd_helper("cp '#{$tails_iso}' '#{tails_iso_hybrid}'")
23 cmd_helper("isohybrid '#{tails_iso_hybrid}' --entry 4 --type 0x1c")
24 cmd_helper("dd if='#{tails_iso_hybrid}' of='#{disk_path}' conv=notrunc")
26 cmd_helper("rm -f '#{tails_iso_hybrid}'")
30 Then /^drive "([^"]+)" is not mounted$/ do |name|
31 next if @skip_steps_while_restoring_background
32 dev = @vm.disk_dev(name)
33 assert(!@vm.execute("grep -qs '^#{dev}' /proc/mounts").success?,
34 "an untrusted partition from drive '#{name}' was automounted")