gluez 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/gluez/impl/linux.rb +12 -4
  2. metadata +2 -2
@@ -51,16 +51,24 @@ module Gluez
51
51
 
52
52
  content = Gluez::Erb::Engine.parse(raw, opts[:vars, {}])
53
53
 
54
+ # setup = <<-CMD
55
+ # data=$(cat <<\\DATA
56
+ # #{content.strip}
57
+ # DATA
58
+ # )
59
+ # CMD
60
+
54
61
  setup = <<-CMD
55
- data=$(cat <<\\DATA
62
+ su -l #{opts[:user, 'root']} -c "cat >~/.gluez_transfer <<\\DATA
56
63
  #{content.strip}
57
64
  DATA
58
- )
65
+ "
59
66
  CMD
60
67
 
68
+
61
69
  steps << {
62
- :check => %Q("\\$(echo -n $data | base64 -i -d | md5sum - | awk '{print $1}')" = "\\$(crontab -u #{name} -l | md5sum - | awk '{print $1}')"),
63
- :code => "echo -n $data | base64 -i -d | crontab -u #{name} -"
70
+ :check => %Q("\\$(cat ~/.gluez_transfer | base64 -i -d - | md5sum - | awk '{print \\$1}')" = "\\$(crontab -u #{name} -l | md5sum - | awk '{print \\$1}')"),
71
+ :code => "cat ~/.gluez_transfer | base64 -i -d - | crontab -u #{name} -"
64
72
  }
65
73
 
66
74
  when :transfer
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gluez
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.2"
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jan Zimmek
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-05 00:00:00 +02:00
13
+ date: 2011-06-06 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies: []
16
16