linecook-gem 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8800cf874d421fa1ae40bbe63906ce2f98aaca75
4
- data.tar.gz: 31782508ced7e2ac8cce8a76e171c72ec2d90236
3
+ metadata.gz: d1b22a12f84db67aa65c0030c0fd60032a86e5c5
4
+ data.tar.gz: 3abe7056d47b837005fef0d368718160e646849e
5
5
  SHA512:
6
- metadata.gz: 4c0cd1037bd21c7c5b721a3def9027d45deaec69edf6a5a20804000d4f53b8c079c2df5490a566cf25b22d9d72318abeec89383ac1a0236f0b2884ac47335ddc
7
- data.tar.gz: b401cc5315622530c1b773e4ad3cc31e308c4265e727772000980123d5893a877d70e5bcaef6ed821bbcc0ce0732f3bddf3ecb05fdaf79071293ae1b065f391f
6
+ metadata.gz: 8a39b3c93b527cb433d576cd4b8debc63875bb367a31a7f1db52b9c26e26dfec3dfc7b5fb8c104356418067031bf64ec0670086b430d89542ec9f86ac5418dcb
7
+ data.tar.gz: f2e9f0d43ab5d55c63cbc025e0680b799965946859b1862b88054cc97c72174e44f79280eea155722c4b1853fcd39a9e3fa50139d70517fc1dc2985e7c6f35a9
@@ -57,12 +57,9 @@ module Linecook
57
57
  def increase_loop_devices
58
58
  kparams = {}
59
59
 
60
- Tempfile.open('cmdline') do |f|
61
- ssh.download('/proc/cmdline', local: f.path)
62
- File.read(f.path).split(/\s+/).each do |param|
63
- k,v = param.split('=')
64
- kparams[k] = v
65
- end
60
+ ssh.capture('cat /proc/cmdline').split(/\s+/).each do |param|
61
+ k,v = param.split('=')
62
+ kparams[k] = v
66
63
  end
67
64
 
68
65
  if loops = kparams['max_loop']
@@ -72,8 +69,8 @@ module Linecook
72
69
 
73
70
  to_create.times do |count|
74
71
  index = last_loop + count
75
- ssh.run("mknod -m660 /dev/loop#{index} b 7 #{index}")
76
- ssh.run("chown root:disk /dev/loop#{index}")
72
+ ssh.run("[ ! -e /dev/loop#{index} ] && sudo mknod -m660 /dev/loop#{index} b 7 #{index}")
73
+ ssh.run("sudo chown root:disk /dev/loop#{index}")
77
74
  end
78
75
  end
79
76
  end
@@ -1,3 +1,3 @@
1
1
  module Linecook
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linecook-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel