smart_proxy_discovery_image 1.2.1 → 1.3.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 249769da7939f13c7cf220e3b347613d5999a4f06ee68f81d0c930ed1494ce59
|
4
|
+
data.tar.gz: b746dcd6207df3f11c666d55dd215a1d14da5d8ae6b7bf710ad65f6438a971a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a85568d2bb0b3ef030f413c197a7d3c04f6c168e15890c968250fc04b79a47024e2e8c3ff4c4b4f213f0b2684313301bd580eeb1b53d9ac9fa03f506ab2642e
|
7
|
+
data.tar.gz: 8d0e231d24fc81b5df213585b67c5ded6b64ee4f9af3cbd1e72b4fdf65ffc15c8f6375414ab83ca14fcf081aacda4b4d00f11cf35b54abca3ce1640aabfdd8fc
|
@@ -17,6 +17,8 @@ module Proxy::DiscoveryImage
|
|
17
17
|
body_data = request.body.read
|
18
18
|
# change virtual terminal out of newt screen
|
19
19
|
system("chvt", "2")
|
20
|
+
is_secureboot = system('mokutil --sb-state|grep enabled')
|
21
|
+
logger.debug "Secure boot is #{is_secureboot}"
|
20
22
|
logger.debug "Initiated kexec provisioning with #{body_data}"
|
21
23
|
log_halt(500, "kexec binary was not found") unless (kexec = which('kexec'))
|
22
24
|
begin
|
@@ -24,7 +26,13 @@ module Proxy::DiscoveryImage
|
|
24
26
|
rescue JSON::ParserError
|
25
27
|
log_halt 500, "Unable to parse kexec JSON input: #{body_data}"
|
26
28
|
end
|
27
|
-
|
29
|
+
args = ["--debug", "--force", "--reset-vga"]
|
30
|
+
args << data['extra'] if data['extra']
|
31
|
+
args << "--kexec-file-syscall" if is_secureboot
|
32
|
+
args << "--append=#{data['append']}"
|
33
|
+
args << "--initrd=/tmp/initrd.img"
|
34
|
+
download_and_run_after_response data, 2, kexec, *args, "/tmp/vmlinuz"
|
35
|
+
|
28
36
|
{ :result => true }.to_json
|
29
37
|
end
|
30
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_discovery_image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Zapletal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Smart Proxy plugin providing Image API on discovered nodes. This plugin is only
|