veewee 0.4.5.1 → 0.5.0.alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +1 -3
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/doc/basics.md +11 -0
  6. data/lib/veewee/environment.rb +1 -1
  7. data/lib/veewee/provider/core/helper/scancode.rb +11 -7
  8. data/lib/veewee/provider/core/helper/web.rb +60 -60
  9. data/lib/veewee/provider/virtualbox/box/helper/console_type.rb +13 -5
  10. data/lib/veewee/templates.rb +3 -0
  11. data/lib/veewee/version.rb +1 -1
  12. data/templates/archlinux-i386/definition.rb +27 -18
  13. data/templates/archlinux-x86_64/definition.rb +16 -16
  14. data/templates/{openSUSE-11.4-DVD-i586/autoinst_de.xml → openSUSE-11.4/autoinst_32_de.xml} +0 -0
  15. data/templates/{openSUSE-11.4-DVD-i586/autoinst_en.xml → openSUSE-11.4/autoinst_32_en.xml} +0 -0
  16. data/templates/{openSUSE-11.4-DVD-x86_64/autoinst_de.xml → openSUSE-11.4/autoinst_64_de.xml} +0 -0
  17. data/templates/{openSUSE-11.4-DVD-x86_64/autoinst_en.xml → openSUSE-11.4/autoinst_64_en.xml} +0 -0
  18. data/templates/openSUSE-11.4/definition.rb +5 -0
  19. data/templates/openSUSE-11.4/definition.yml +21 -0
  20. data/templates/openSUSE-11.4/definition_32_dvd_de.yml +15 -0
  21. data/templates/openSUSE-11.4/definition_32_dvd_en.yml +15 -0
  22. data/templates/openSUSE-11.4/definition_32_net_de.yml +15 -0
  23. data/templates/openSUSE-11.4/definition_32_net_en.yml +15 -0
  24. data/templates/openSUSE-11.4/definition_64_dvd_de.yml +15 -0
  25. data/templates/openSUSE-11.4/definition_64_dvd_en.yml +15 -0
  26. data/templates/openSUSE-11.4/definition_64_net_de.yml +15 -0
  27. data/templates/openSUSE-11.4/definition_64_net_en.yml +15 -0
  28. data/templates/{openSUSE-11.4-DVD-i586 → openSUSE-11.4}/postinstall.sh +0 -0
  29. data/templates/{openSUSE-12.1-DVD+NET-i586/autoinst_de.xml → openSUSE-12.1/autoinst_32_de.xml} +0 -0
  30. data/templates/{openSUSE-12.1-DVD+NET-i586/autoinst_en.xml → openSUSE-12.1/autoinst_32_en.xml} +0 -0
  31. data/templates/{openSUSE-12.1-DVD+NET-x86_64/autoinst_de.xml → openSUSE-12.1/autoinst_64_de.xml} +0 -0
  32. data/templates/{openSUSE-12.1-DVD+NET-x86_64/autoinst_en.xml → openSUSE-12.1/autoinst_64_en.xml} +0 -0
  33. data/templates/openSUSE-12.1/definition.rb +5 -0
  34. data/templates/openSUSE-12.1/definition.yml +21 -0
  35. data/templates/openSUSE-12.1/opensuse_32_dvd_de.yml +14 -0
  36. data/templates/openSUSE-12.1/opensuse_32_dvd_en.yml +14 -0
  37. data/templates/openSUSE-12.1/opensuse_32_net_de.yml +14 -0
  38. data/templates/openSUSE-12.1/opensuse_32_net_en.yml +14 -0
  39. data/templates/openSUSE-12.1/opensuse_64_dvd_de.yml +14 -0
  40. data/templates/openSUSE-12.1/opensuse_64_dvd_en.yml +14 -0
  41. data/templates/openSUSE-12.1/opensuse_64_net_de.yml +14 -0
  42. data/templates/openSUSE-12.1/opensuse_64_net_en.yml +14 -0
  43. data/templates/{openSUSE-11.4-DVD-x86_64 → openSUSE-12.1}/postinstall.sh +0 -0
  44. data/templates/{openSUSE-12.3-x86_64-NET_EN → openSUSE-12.3}/README.md +0 -0
  45. data/templates/{openSUSE-12.3-x86_64-NET_EN → openSUSE-12.3}/autoinst.xml +0 -0
  46. data/templates/openSUSE-12.3/definition.rb +2 -0
  47. data/templates/openSUSE-12.3/definition.yml +36 -0
  48. data/templates/{openSUSE-12.3-x86_64-NET_EN → openSUSE-12.3}/postinstall.sh +0 -0
  49. data/templates/{openSUSE-12.3-x86_64-NET_EN → openSUSE-12.3}/virtualbox.sh +0 -0
  50. data/templates/openSUSE-13.1/definition.rb +5 -70
  51. data/templates/openSUSE-13.1/definition.yml +24 -0
  52. data/templates/openSUSE-13.1/opensuse_32_dvd.yml +8 -0
  53. data/templates/openSUSE-13.1/opensuse_32_net.yml +9 -0
  54. data/templates/openSUSE-13.1/opensuse_64_dvd.yml +9 -0
  55. data/templates/openSUSE-13.1/opensuse_64_net.yml +10 -0
  56. data/veewee.gemspec +6 -1
  57. metadata +62 -40
  58. data/.rvmrc +0 -6
  59. data/templates/openSUSE-11.4-DVD-i586/definition.rb +0 -28
  60. data/templates/openSUSE-11.4-DVD-x86_64/definition.rb +0 -28
  61. data/templates/openSUSE-11.4-NET-i586/autoinst_de.xml +0 -1278
  62. data/templates/openSUSE-11.4-NET-i586/autoinst_en.xml +0 -1278
  63. data/templates/openSUSE-11.4-NET-i586/definition.rb +0 -28
  64. data/templates/openSUSE-11.4-NET-i586/postinstall.sh +0 -48
  65. data/templates/openSUSE-11.4-NET-x86_64/autoinst_de.xml +0 -1453
  66. data/templates/openSUSE-11.4-NET-x86_64/autoinst_en.xml +0 -1453
  67. data/templates/openSUSE-11.4-NET-x86_64/definition.rb +0 -28
  68. data/templates/openSUSE-11.4-NET-x86_64/postinstall.sh +0 -48
  69. data/templates/openSUSE-12.1-DVD+NET-i586/definition.rb +0 -44
  70. data/templates/openSUSE-12.1-DVD+NET-i586/postinstall.sh +0 -48
  71. data/templates/openSUSE-12.1-DVD+NET-x86_64/definition.rb +0 -44
  72. data/templates/openSUSE-12.1-DVD+NET-x86_64/postinstall.sh +0 -48
  73. data/templates/openSUSE-12.3-x86_64-NET_EN/definition.rb +0 -37
  74. data/templates/opensuse-11.4-i386-experimental/README +0 -11
  75. data/templates/opensuse-11.4-i386-experimental/autoinst.xml +0 -1269
  76. data/templates/opensuse-11.4-i386-experimental/autoinst.xml.generated +0 -1269
  77. data/templates/opensuse-11.4-i386-experimental/autoinst.xml.tweaked +0 -1269
  78. data/templates/opensuse-11.4-i386-experimental/definition.rb +0 -31
  79. data/templates/opensuse-11.4-i386-experimental/postinstall.sh +0 -90
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Nzk4NzUyZDE4NTc4N2M0MmNkZGU1MmVlMmE1ZjYxMjVlYzZmYzhiMw==
4
+ MDgwZThlZDY5ZTBmZDFhZDVjYjQ3YzRmMjFlY2NmNzBiMmZlYTMyMg==
5
5
  data.tar.gz: !binary |-
6
- YmYxNTQ5ZjU4MDgxZDk3ZDhiM2E5YWExZTE4YjI1ODVhNmJjNTQ1OA==
6
+ ZmEwZTc3MTc4OGFiY2IzZDZjOWQ4ODc4ZmQ4NDMwMmY0NjhlOTQyNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjQ5ZDczYWI1MTc1ODEyYWQ0MWYzMTY5MDdlNGFlYWFjZDMyYmQzZmY3MjI4
10
- OTBkYjllMGUzNmViOTRlMGRiYjkwMmU3OTMxOTE4MGVhNWUwMWM4NmU2OTE2
11
- NTZhZDIzYzQxODgyMTljYmIzZWNkNGM4NmJlNGIwZDBlNzNiZjQ=
9
+ MzNlYTg0YTIyN2JjYWZmMDdkMzAxMTdmNmI4ZGVjNGM0NmRhMmU3NWY3YjUw
10
+ NjMwM2M3ZWY4OWJlYzg2ZTRhYTU0MzgzMmE0NGFlMzc4MTA2ZmU2NGE1M2Nk
11
+ NDUyNTNhZjBkZTJhZjhkOGU5YWYxMjkyYjM0OWMzMjc5NmIzYTA=
12
12
  data.tar.gz: !binary |-
13
- MTM5NjhjYWMxNjk5Zjk4YmNmNzE3Yjg5NmMwNjQzN2RmMTBlMTdkZGY0NDg4
14
- NTE0OTE0MTljNmNkMDRiZTExZWM2MTg5NzRhNjRkN2Y1ZGM1Y2Y3M2IyYTMx
15
- ODUwZTY2YzhmNjQ1MzRmZWJmMWYyNWU4M2I2MGY3MzZiYmFmMGY=
13
+ Y2Q4ZjE4MDJkZThlYTM0YTU2MDcyMmI4M2NhOWM0OWRiMzM0MmU5YzllYjNi
14
+ OGI1OTAzZDIwMTIwZDBlMzZkZjE4YTI3NmZmMzM0Y2UzM2JhZGZjZTMxMTRi
15
+ NGM1YTM4YjhhMGRmYTU0MDk1MGY2NzBlYjg1NGY0NDQ2OThhNzA=
data/.gitignore CHANGED
@@ -20,7 +20,5 @@ pkg/*
20
20
  virtualfloppy.vfd
21
21
  *.swp
22
22
  AutoPartition.app
23
- .ruby-version
24
- .rbenv-gemsets
23
+ .rvmrc
25
24
  .project
26
- .ruby-version
@@ -0,0 +1 @@
1
+ veewee
@@ -0,0 +1 @@
1
+ ruby-1.9.3-p547
@@ -62,6 +62,17 @@ Veewee provides templates for a lot of different operation systems. To see all t
62
62
 
63
63
  Templates have the same structure as definitions, but templates are used to generate definitions. Definitions are simply **your** customizable templates that you can modify as you see fit.
64
64
 
65
+ ### Template sources
66
+
67
+ Veewee will detect all gems with `veewee-templates` gemspec `metadata` pointing to templates directory:
68
+
69
+ ```ruby
70
+ spec.metadata = {
71
+ "veewee-templates" => "templates"
72
+ }
73
+ ```
74
+
75
+ For example see [veewee.gemspec](../veewee.gemspec).
65
76
 
66
77
  ## Create a definition
67
78
 
@@ -66,7 +66,7 @@ module Veewee
66
66
  defaults = {
67
67
  :cwd => cwd,
68
68
  :veewee_filename => "Veeweefile",
69
- :template_path => [File.expand_path(File.join(File.dirname(__FILE__), "..", "..", 'templates')), "templates"],
69
+ :template_path => ["templates"],
70
70
  :validation_dir => File.join(File.expand_path(File.join(File.dirname(__FILE__), "..", "..")), "validation"),
71
71
  }
72
72
 
@@ -35,15 +35,16 @@ module Veewee
35
35
  end
36
36
  end
37
37
 
38
- @@special_keys=Hash.new;
38
+ @@special_keys = Hash.new;
39
39
  @@special_keys['<Enter>'] = '1c 9c';
40
40
  @@special_keys['<Backspace>'] = '0e 8e';
41
+ @@special_keys['<Bs>'] = '0e 8e';
41
42
  @@special_keys['<Spacebar>'] = '39 b9';
42
43
  @@special_keys['<Return>'] = '1c 9c'
43
44
  @@special_keys['<Esc>'] = '01 81';
44
45
  @@special_keys['<Tab>'] = '0f 8f';
45
46
  @@special_keys['<KillX>'] = '1d 38 0e b8';
46
- @@special_keys['<Wait>'] = 'wait';
47
+ @@special_keys['<Wait(\d*)>'] = 'wait';
47
48
 
48
49
  @@special_keys['<Up>'] = '48 c8';
49
50
  @@special_keys['<Down>'] = '50 d0';
@@ -52,6 +53,7 @@ module Veewee
52
53
  @@special_keys['<End>'] = '4f cf';
53
54
  @@special_keys['<Insert>'] = '52 d2';
54
55
  @@special_keys['<Delete>'] = '53 d3';
56
+ @@special_keys['<Del>'] = '53 d3';
55
57
  @@special_keys['<Left>'] = '4b cb';
56
58
  @@special_keys['<Right>'] = '4d cd';
57
59
  @@special_keys['<Home>'] = '47 c7';
@@ -69,13 +71,15 @@ module Veewee
69
71
 
70
72
  until thestring.length == 0
71
73
  nospecial=true;
72
- @@special_keys.keys.each { |key|
73
- if thestring.match(/^#{key}/i)
74
+ @@special_keys.each { |key, value|
75
+ if
76
+ result = thestring.match(/^#{key}/i)
77
+ then
74
78
  #take thestring
75
79
  #check if it starts with a special key + pop special string
76
- keycodes=keycodes+@@special_keys[key]+' ';
77
- thestring=thestring.slice(key.length,thestring.length-key.length)
78
- nospecial=false;
80
+ keycodes += value + result.captures.join(",") + ' '
81
+ thestring = thestring.slice(result.string.length, thestring.length-result.string.length)
82
+ nospecial = false;
79
83
  break;
80
84
  end
81
85
  }
@@ -2,87 +2,87 @@ module Veewee
2
2
  module Provider
3
3
  module Core
4
4
  module Helper
5
+
5
6
  require 'webrick'
6
7
 
7
8
  include WEBrick
8
9
 
9
- module Servlet
10
-
11
- class FileServlet < WEBrick::HTTPServlet::AbstractServlet
12
- attr_reader :ui, :threaded
13
-
14
- def initialize(server,localfile,ui,threaded)
15
- super(server)
16
- @server=server
17
- @localfile=localfile
18
- @ui=ui
19
- @threaded=threaded
20
- end
21
-
22
- def do_GET(request,response)
23
- response['Content-Type']='text/plain'
24
- response.status = 200
25
- content = File.open(@localfile, "r").read
26
- response.body =
27
- case File.extname(@localfile)
28
- when ".erb"
29
- ui.info "Rendering and serving file #{@localfile}"
30
- ERB.new(content).result(binding)
31
- else
32
- ui.info "Serving file #{@localfile}"
33
- content
34
- end
35
- if not @threaded
36
- ui.info "Shutting down for #{@localfile}"
37
- @server.shutdown
38
- end
39
- end
40
- end
41
- end
42
-
43
10
  module Web
44
- def wait_for_http_request(filename, urlname, options) # original blocking
45
- server_for_http_request(filename, urlname, options) do |server|
46
- server.start
11
+ def wait_for_http_request(filename, urlname, options) # thread with timeout
12
+ thread = allow_for_http_request(filename, urlname, options)
13
+ timeout = options[:timeout] || 60
14
+ thread.join(timeout) or begin
15
+ thread.kill
16
+ raise "File #{filename.inspect} was not requested as #{urlname.inspect} in #{timeout} seconds, are you using firewall blocking connections to port: #{options[:port]}?"
47
17
  end
48
18
  end
49
19
 
50
20
  def allow_for_http_request(filename, urlname, options) # start in new thread
51
- server_for_http_request(filename, urlname, options.merge({:threaded => false})) do |server|
52
- t = Thread.new { server.start }
53
- t.abort_on_exception = true
21
+ thread = Thread.new do
22
+ server_for_http_request(filename, urlname, options)
54
23
  end
24
+ thread.abort_on_exception = true
25
+ trap("INT") { thread.kill }
26
+ thread
27
+ end
28
+
29
+ private
30
+
31
+ def server_for_http_request(filename, urlname, options)
32
+ initialize_server(options[:port])
33
+ mount_file(filename, urlname)
34
+ @server.start
35
+ ensure
36
+ server_shutdown
55
37
  end
56
38
 
57
- def server_for_http_request(filename, urlname, options, &block)
39
+ def initialize_server(port)
58
40
  # Calculate the OS equivalent of /dev/null , on windows this is NUL:
59
41
  # http://www.ruby-forum.com/topic/115472
60
42
  fn = test(?e, '/dev/null') ? '/dev/null' : 'NUL:'
61
43
  webrick_logger = WEBrick::Log.new(fn, WEBrick::Log::INFO)
62
44
 
63
- timeout = options[:timeout] || 60
64
- Timeout.timeout(timeout) do
65
- server =
66
- ::WEBrick::HTTPServer.new(
67
- :Port => options[:port],
68
- :Logger => webrick_logger,
69
- :AccessLog => webrick_logger
70
- )
71
- env.logger.debug("mounting file #{urlname}")
72
- server.mount("#{urlname}", Veewee::Provider::Core::Helper::Servlet::FileServlet, filename, ui, options[:threaded])
73
- trap("INT"){
74
- server.shutdown
75
- ui.info "Stopping webserver"
76
- exit
77
- }
78
- yield server
45
+ @server =
46
+ ::WEBrick::HTTPServer.new(
47
+ :Port => port,
48
+ :Logger => webrick_logger,
49
+ :AccessLog => webrick_logger,
50
+ )
51
+ end
52
+
53
+ def mount_file(filename, urlname)
54
+ urlname = urlname[0..-5] if File.extname(urlname) == ".erb"
55
+
56
+ @server.mount_proc(urlname) do |request, response|
57
+ ui.info "Serving content for #{urlname}"
58
+ response['Content-Type']='text/plain'
59
+ response.status = 200
60
+ response.body = read_content(filename)
61
+ server_shutdown
62
+ end
63
+ end
64
+
65
+ def read_content(filename)
66
+ ui.info "Reading content #{filename}"
67
+ content = File.open(filename, "r").read
68
+ if File.extname(filename) == ".erb"
69
+ ui.info "Evaluating template #{filename}"
70
+ content = ::ERB.new(content).result(binding)
71
+ end
72
+ content
73
+ end
74
+
75
+ def server_shutdown
76
+ if @server
77
+ ui.info "Stopping webserver"
78
+ yield @server if block_given?
79
+ @server.shutdown
80
+ @server = nil
79
81
  end
80
- rescue Timeout::Error
81
- server.shutdown unless server.nil?
82
- raise "File #{filename.inspect} was not requested in #{timeout}seconds, are you using firewall blocking connections to port: #{options[:port]}?"
83
82
  end
84
83
 
85
84
  end #Class
85
+
86
86
  end #Module
87
87
  end #Module
88
88
  end #Module
@@ -29,11 +29,11 @@ module Veewee
29
29
  # A workaround is to send the scancodes one-by-one.
30
30
  codes=""
31
31
  for keycode in keycodes.split(' ') do
32
- unless keycode=="wait"
32
+ case keycode
33
+ when /^wait(\d*)$/ then sleep_guess($1)
34
+ else
33
35
  send_keycode(keycode)
34
36
  sleep 0.01
35
- else
36
- sleep 1
37
37
  end
38
38
  end
39
39
  #sleep after each sequence (needs to be param)
@@ -45,11 +45,19 @@ module Veewee
45
45
 
46
46
  end
47
47
 
48
+ def sleep_guess(str)
49
+ str = "1" if str == ""
50
+ sleep str.to_i
51
+ end
52
+
48
53
  def send_keycode(keycode)
49
54
  command= "#{@vboxcmd} controlvm \"#{name}\" keyboardputscancode #{keycode}"
50
55
  env.logger.debug "#{command}"
51
- sshresult=shell_exec("#{command}",{:mute => true})
52
- unless sshresult.stdout.index("E_ACCESSDENIED").nil?
56
+ sshresult = shell_exec("#{command}",{:mute => true})
57
+ env.logger.debug "\
58
+ sshresult.stdout: #{sshresult.stdout.inspect},
59
+ sshresult.stderr: #{sshresult.stderr.inspect}"
60
+ if sshresult.stdout.index("E_ACCESSDENIED")
53
61
  error= "There was an error typing the commands on the console"
54
62
  error+="Probably the VM did not get started."
55
63
  error+= ""
@@ -1,3 +1,5 @@
1
+ require "gem-content"
2
+
1
3
  module Veewee
2
4
  class Templates
3
5
 
@@ -53,6 +55,7 @@ module Veewee
53
55
  # Traverses path to see which exist or not
54
56
  # and checks if available
55
57
  def valid_paths(paths)
58
+ paths = GemContent.get_gem_paths("veewee-templates")
56
59
  valid_paths = paths.collect { |path|
57
60
  if File.exists?(path) && File.directory?(path)
58
61
  env.logger.info "Path #{path} exists"
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  # Only set the version constant if it wasn't set before
6
6
  unless defined?(Veewee::VERSION)
7
- ::Veewee::VERSION="0.4.5.1"
7
+ ::Veewee::VERSION="0.5.0.alpha1"
8
8
  end
@@ -1,29 +1,38 @@
1
1
  Veewee::Definition.declare({
2
- :cpu_count => '1', :memory_size=> '256',
3
- :disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
4
- :os_type_id => 'ArchLinux',
5
- :iso_file => "archlinux-2010.05-core-i686.iso",
6
- :iso_src => "http://archlinux.mirror.kangaroot.net/iso/2010.05/archlinux-2010.05-core-i686.iso",
7
- :iso_md5 => "5db5fd11713635cff208b11a498c59ef",
2
+ :cpu_count => "1",
3
+ :memory_size => "256",
4
+ :disk_size => "10140",
5
+ :disk_format => "VDI",
6
+ :hostiocache => "off",
7
+ :os_type_id => "ArchLinux",
8
+ :iso_file => "archlinux-2010.05-core-i686.iso",
9
+ :iso_src => "http://archlinux.mirror.kangaroot.net/iso/2010.05/archlinux-2010.05-core-i686.iso",
10
+ :iso_md5 => "5db5fd11713635cff208b11a498c59ef",
8
11
  :iso_download_timeout => "1000",
9
- :boot_wait => "5", :boot_cmd_sequence => [
12
+ :boot_wait => "5",
13
+ :boot_cmd_sequence => [
10
14
  '<Enter>',
11
- '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
12
- '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
13
- '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
14
- 'root<Enter>',
15
+ '<Wait30>',
16
+ 'root<Enter>',
15
17
  'dhcpcd eth0<Enter><Wait><Wait>',
16
18
  'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
17
19
  'passwd<Enter>',
18
20
  'vagrant<Enter>',
19
21
  'vagrant<Enter>',
20
22
  '/etc/rc.d/sshd start<Enter><Wait>',
21
- 'sleep 3 && wget http://%IP%:%PORT%/aif.cfg<Enter>',
23
+ 'sleep 3 && wget http://%IP%:%PORT%/aif.cfg<Enter>',
22
24
  ],
23
- :kickstart_port => "7122", :kickstart_timeout => "300", :kickstart_file => "aif.cfg",
24
- :ssh_login_timeout => "10000", :ssh_user => "root", :ssh_password => "vagrant", :ssh_key => "",
25
- :ssh_host_port => "7222", :ssh_guest_port => "22",
26
- :sudo_cmd => "sh '%f'",
27
- :shutdown_cmd => "shutdown -h now",
28
- :postinstall_files => [ "postinstall.sh"], :postinstall_timeout => "10000"
25
+ :kickstart_port => "7122",
26
+ :kickstart_timeout => "300",
27
+ :kickstart_file => "aif.cfg",
28
+ :ssh_login_timeout => "10000",
29
+ :ssh_user => "root",
30
+ :ssh_password => "vagrant",
31
+ :ssh_key => "",
32
+ :ssh_host_port => "7222",
33
+ :ssh_guest_port => "22",
34
+ :sudo_cmd => "sh '%f'",
35
+ :shutdown_cmd => "shutdown -h now",
36
+ :postinstall_files => [ "postinstall.sh"],
37
+ :postinstall_timeout => "10000",
29
38
  })
@@ -9,34 +9,34 @@ iso_md5 = response[0]
9
9
  root_password = 'veewee'
10
10
 
11
11
  Veewee::Definition.declare({
12
- :cpu_count => '1',
13
- :memory_size => '256',
14
- :disk_size => '10140',
15
- :disk_format => 'VDI',
16
- :hostiocache => 'off',
17
- :os_type_id => 'ArchLinux_64',
12
+ :cpu_count => "1",
13
+ :memory_size => "256",
14
+ :disk_size => "10140",
15
+ :disk_format => "VDI",
16
+ :hostiocache => "off",
17
+ :os_type_id => "ArchLinux_64",
18
18
  :iso_file => iso,
19
19
  :iso_src => "#{iso_mirror}/#{iso}",
20
20
  :iso_md5 => iso_md5,
21
- :iso_download_timeout => '1000',
22
- :boot_wait => '5',
21
+ :iso_download_timeout => "1000",
22
+ :boot_wait => "5",
23
23
  :boot_cmd_sequence => [
24
24
  '<Enter>',
25
- '<Wait>' * 30,
25
+ '<Wait30>',
26
26
  'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
27
27
  'passwd<Enter>',
28
28
  "#{root_password}<Enter>",
29
29
  "#{root_password}<Enter>",
30
30
  'systemctl start sshd.service<Enter><Wait>',
31
31
  ],
32
- :ssh_login_timeout => '10000',
33
- :ssh_user => 'root',
32
+ :ssh_login_timeout => "10000",
33
+ :ssh_user => "root",
34
34
  :ssh_password => "#{root_password}",
35
- :ssh_key => '',
36
- :ssh_host_port => '7222',
37
- :ssh_guest_port => '22',
35
+ :ssh_key => "",
36
+ :ssh_host_port => "7222",
37
+ :ssh_guest_port => "22",
38
38
  :sudo_cmd => "sh '%f'",
39
- :shutdown_cmd => 'shutdown -h now',
39
+ :shutdown_cmd => "shutdown -h now",
40
40
  :postinstall_files => [
41
41
  'base.sh',
42
42
  'pacman.sh',
@@ -55,7 +55,7 @@ Veewee::Definition.declare({
55
55
  'cleanup.sh',
56
56
  'zerodisk.sh',
57
57
  ],
58
- :postinstall_timeout => '10000',
58
+ :postinstall_timeout => "10000",
59
59
  :params => {
60
60
  #:PACMAN_REFLECTOR_ARGS => '--verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist',
61
61
  }