vagrant-winnfsd 1.0.0 → 1.0.1

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.
data/CHANGELOG CHANGED
@@ -1,6 +1,14 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 1.0.1
5
+ -----
6
+
7
+ 2013-12-18
8
+
9
+ Fix batch file
10
+ Easy setup for the firewall rules
11
+
4
12
  1.0.0
5
13
  -----
6
14
 
data/bin/nfsservice.bat CHANGED
@@ -17,7 +17,7 @@ if %1==status (
17
17
  if %1==start (
18
18
  printf "[NFS] Start: "
19
19
  if %RUNNINGTASKS% == 0 (
20
- start "%~dp0winnfsd" -log off -pathFile %2
20
+ start "" "%~dp0winnfsd" -log off -pathFile %2
21
21
  printf "started\n"
22
22
  ) else (
23
23
  printf "already running\n"
@@ -0,0 +1,3 @@
1
+ Set UAC = CreateObject("Shell.Application")
2
+ UAC.ShellExecute "netsh", Replace(WScript.Arguments(0), "'", Chr(34)), "", "runas", 1
3
+ UAC.ShellExecute "netsh", Replace(WScript.Arguments(1), "'", Chr(34)), "", "runas", 1
@@ -43,11 +43,14 @@ module VagrantPlugins
43
43
  rule_exist = "netsh advfirewall firewall show rule name=\"%s\">nul"
44
44
 
45
45
  unless system(sprintf(rule_exist, rule_name))
46
- rule = "netsh advfirewall firewall add rule name=\"%s\" dir=\"%s\" action=allow protocol=any program=\"%s\" profile=any>nul"
46
+ rule = "advfirewall firewall add rule name='%s' dir='%s' action=allow protocol=any program='%s' profile=any"
47
47
  in_rule = sprintf(rule, rule_name, 'in', program)
48
48
  out_rule = sprintf(rule, rule_name, 'out', program)
49
49
 
50
- if !system(in_rule) || !system(out_rule)
50
+ firewall_script = VagrantWinNFSd.get_path_for_file("setupfirewall.vbs")
51
+ firewall_rule = "cscript //nologo #{firewall_script} \"#{in_rule}\" \"#{out_rule}\""
52
+
53
+ unless system(firewall_rule)
51
54
  puts I18n.t("vagrant_winnfsd.firewall.error")
52
55
  puts "#{in_rule}\n"
53
56
  puts "#{out_rule}\n"
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module VagrantWinNFSd
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -10,4 +10,4 @@ en:
10
10
  firewall:
11
11
  error: |-
12
12
  It seems that you don't have the prevelegs to change the firewall rules. NFS will not work without that firewall
13
- changes. Run Vagrant as administartor or execute the following comands as administartor:
13
+ changes. Execute the following comands as administartor:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-winnfsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
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: 2013-12-13 00:00:00.000000000 Z
12
+ date: 2013-12-18 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' Manage and adds support for NFS on windows.
15
15
 
@@ -20,6 +20,7 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - bin/nfsservice.bat
23
+ - bin/setupfirewall.vbs
23
24
  - bin/winnfsd.exe
24
25
  - CHANGELOG
25
26
  - Gemfile
@@ -51,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
52
  version: '0'
52
53
  segments:
53
54
  - 0
54
- hash: 956270419
55
+ hash: 877946605
55
56
  required_rubygems_version: !ruby/object:Gem::Requirement
56
57
  none: false
57
58
  requirements:
@@ -60,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
61
  version: '0'
61
62
  segments:
62
63
  - 0
63
- hash: 956270419
64
+ hash: 877946605
64
65
  requirements: []
65
66
  rubyforge_project:
66
67
  rubygems_version: 1.8.28