linecook-gem 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linecook/builder/lxc.rb +1 -1
- data/lib/linecook/image/github.rb +0 -1
- data/lib/linecook/image/manager.rb +3 -1
- data/lib/linecook/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63aa11b78f4d54bbf71ed8fe7b0124ee187da340
|
4
|
+
data.tar.gz: f058f919337be4786451cab400fe98fecc851663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d58fe7eb1dadfffa8843cf3268ae62895f464274b98ff66966649dbb32a45c24027adab83b1a00b8b09e1fc55d7d0e5b1e0c4b1fa0209df2ddfb6ebf296f368
|
7
|
+
data.tar.gz: 5b1a68cfd15ec88fcf6c2d287a5cb862c95db1e1846de8eb30ed2299d537c01630738ea0bbe5d2d258047fd1166866953e05fe66c346938c8cab692330fced5d
|
data/lib/linecook/builder/lxc.rb
CHANGED
@@ -92,7 +92,7 @@ module Linecook
|
|
92
92
|
def wait_ssh
|
93
93
|
if @remote
|
94
94
|
user = Linecook::Build::USERNAME
|
95
|
-
cexec("id -u #{user}
|
95
|
+
cexec("id -u #{user} || useradd -m -G sudo #{user}")
|
96
96
|
cexec("mkdir -p /home/#{user}/.ssh")
|
97
97
|
Linecook::Builder.ssh.upload(Linecook::SSH.public_key, "/tmp/#{@name}-pubkey")
|
98
98
|
Linecook::Builder.ssh.run("sudo mv /tmp/#{@name}-pubkey #{@root}/home/#{user}/.ssh/authorized_keys")
|
@@ -14,13 +14,15 @@ module Linecook
|
|
14
14
|
url_path = if image.is_a?(Symbol)
|
15
15
|
image_name = Linecook.config[:image][:images][image][:name]
|
16
16
|
path = File.join(IMAGE_PATH, image_name)
|
17
|
-
provider(profile).url(
|
17
|
+
provider(profile).url(image_name) unless File.exist?(path) || upgrade
|
18
18
|
elsif image.is_a?(Hash)
|
19
19
|
profile = :private
|
20
20
|
encrypted = true
|
21
21
|
name = image[:name] == :latest ? File.basename(latest(image[:type])) : image[:name]
|
22
22
|
path = File.join([IMAGE_PATH, image[:type], name].compact)
|
23
23
|
provider(profile).url(name, type: image[:type])
|
24
|
+
else
|
25
|
+
puts "#{image} is invalid"
|
24
26
|
end
|
25
27
|
|
26
28
|
Linecook::Downloader.download(url_path, path, encrypted: encrypted) unless File.exist?(path) || upgrade
|
data/lib/linecook/version.rb
CHANGED