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: e5fc93e913ac9a70a9d099a12e4a7eba8139777de210569b44fb8e305e74299c
4
- data.tar.gz: b41a1f2e085f2f7a04a33a88a6f670581d1d89ae34b6a59a497b135f12ad76ea
3
+ metadata.gz: 249769da7939f13c7cf220e3b347613d5999a4f06ee68f81d0c930ed1494ce59
4
+ data.tar.gz: b746dcd6207df3f11c666d55dd215a1d14da5d8ae6b7bf710ad65f6438a971a9
5
5
  SHA512:
6
- metadata.gz: e79b8fc34a0f3e04a99fd5f380bb9aa55699fe9d9db0b61e093173e41aa98e0340a8bc99a981b799ae669b5aec8fed82283d6c00ebd5000ced63c026cf6af94d
7
- data.tar.gz: 6c2a81f40a1f6285a3e928cea8340a7c3ad633bd3cca2f87c1352b76f1c4599c49f94b15b5f6b8fbd4e66349c24dc9ceeba27bbfdb17d8bd85f8aa6c98f63de3
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
- download_and_run_after_response data, 2, kexec, "--debug", "--force", "--append=#{data['append']}", "--initrd=/tmp/initrd.img", "/tmp/vmlinuz", *data['extra']
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
 
@@ -1,5 +1,5 @@
1
1
  module Proxy
2
2
  module DiscoveryImage
3
- VERSION = '1.2.1'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
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.2.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-08-06 00:00:00.000000000 Z
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