vagrant-serial 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,10 +7,10 @@ module Vagrant
7
7
  end
8
8
 
9
9
  def call(env)
10
- command = ["modifyvm", env[:machine].id, "--uart1", "0x3F8", "4", "--uartmode1", "server", "/home/vagrant/serial/#{env[:machine].id}-com1"]
11
- env[:machine].provider.driver.execute_command(command)
12
- command = ["modifyvm", env[:machine].id, "--uart2", "0x2F8", "3", "--uartmode1", "server", "/home/vagrant/serial/#{env[:machine].id}-com2"]
13
- env[:machine].provider.driver.execute_command(command)
10
+ command = ["modifyvm", env[:vm].id, "--uart1", "0x3F8", "4", "--uartmode1", "server", "$HOME/serial/#{env[:vm].id}-com1"]
11
+ env[:vm].provider.driver.execute_command(command)
12
+ command = ["modifyvm", env[:vm].id, "--uart2", "0x2F8", "3", "--uartmode1", "server", "$HOME/serial/#{env[:vm].id}-com2"]
13
+ env[:vm].provider.driver.execute_command(command)
14
14
  @app.call(env)
15
15
  end
16
16
  end
@@ -7,8 +7,8 @@ module Vagrant
7
7
  end
8
8
 
9
9
  def call(env)
10
- `socat tcp-l:30001,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:machine].id}-com1 &`
11
- `socat tcp-l:30002,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:machine].id}-com2 &`
10
+ env[:vm].channel.execute("socat tcp-l:30001,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:vm].id}-com1 &")
11
+ env[:vm].channel.execute("socat tcp-l:30002,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:vm].id}-com2 &")
12
12
  @app.call(env)
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Serial
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -4,5 +4,5 @@ require "vagrant-serial/version"
4
4
  require "vagrant-serial/middleware/configure"
5
5
  require "vagrant-serial/middleware/forward"
6
6
 
7
- Vagrant.actions[:provision].insert_after(Vagrant::Action::VM::Provision, Vagrant::Serial::Middleware::Configure)
8
- Vagrant.actions[:start].insert_after(Vagrant::Action::VM::Provision, Vagrant::Serial::Middleware::Forward)
7
+ Vagrant.actions[:start].insert_after Vagrant::Action::VM::ShareFolders, Vagrant::Serial::Middleware::Configure
8
+ Vagrant.actions[:start].use Vagrant::Serial::Middleware::Forward
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-serial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-25 00:00:00.000000000 Z
12
+ date: 2012-10-26 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Vagrant plugin to configure serial-ports in vms
15
15
  email: