cfa_grub2 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cfa/grub2/default.rb +16 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1da92fc0c60471bb86fa2fd4a2f34fdabfc5f00f
|
4
|
+
data.tar.gz: 40dca436f09e1af024629f4fff80610e2c087015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce4ab7c565ab5f29cf685345fa6b3b01d027081ae208d3e7f919ec68c9c42fa1e348c30f7319bda4961d6417807bc29acd5e1d494ed52cf7d3afc56dbb48b947
|
7
|
+
data.tar.gz: bfa469d565c5acf02fd2d0ba1ef4efa3fc0e07d81b72c7b48120241df15c2e2b7cef08ebbd52f81d6b782b1d2b039ec669a7e367c39b61fbb18d31d7830aad01
|
data/lib/cfa/grub2/default.rb
CHANGED
@@ -49,7 +49,7 @@ module CFA
|
|
49
49
|
kernels = [kernel_params, xen_hypervisor_params, xen_kernel_params,
|
50
50
|
recovery_params]
|
51
51
|
kernels.each do |kernel|
|
52
|
-
param_line =
|
52
|
+
param_line = value_for(kernel.key)
|
53
53
|
kernel.replace(param_line) if param_line
|
54
54
|
end
|
55
55
|
end
|
@@ -64,27 +64,28 @@ module CFA
|
|
64
64
|
|
65
65
|
def kernel_params
|
66
66
|
@kernel_params ||= KernelParams.new(
|
67
|
-
|
67
|
+
value_for("GRUB_CMDLINE_LINUX_DEFAULT"), "GRUB_CMDLINE_LINUX_DEFAULT"
|
68
68
|
)
|
69
69
|
end
|
70
70
|
|
71
71
|
def xen_hypervisor_params
|
72
72
|
@xen_hypervisor_params ||= KernelParams.new(
|
73
|
-
|
73
|
+
value_for("GRUB_CMDLINE_XEN_DEFAULT"),
|
74
74
|
"GRUB_CMDLINE_XEN_DEFAULT"
|
75
75
|
)
|
76
76
|
end
|
77
77
|
|
78
78
|
def xen_kernel_params
|
79
79
|
@xen_kernel_params ||= KernelParams.new(
|
80
|
-
|
80
|
+
value_for("GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT"),
|
81
81
|
"GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT"
|
82
82
|
)
|
83
83
|
end
|
84
84
|
|
85
85
|
def recovery_params
|
86
86
|
@recovery_params ||= KernelParams.new(
|
87
|
-
|
87
|
+
value_for("GRUB_CMDLINE_LINUX_RECOVERY"),
|
88
|
+
"GRUB_CMDLINE_LINUX_RECOVERY"
|
88
89
|
)
|
89
90
|
end
|
90
91
|
|
@@ -102,13 +103,14 @@ module CFA
|
|
102
103
|
end
|
103
104
|
|
104
105
|
def terminal
|
105
|
-
|
106
|
+
value = value_for("GRUB_ENABLE_CRYPTODISK")
|
107
|
+
case value
|
106
108
|
when "", nil then nil
|
107
109
|
when "console" then :console
|
108
110
|
when "serial" then :serial
|
109
111
|
when "gfxterm" then :gfxterm
|
110
112
|
else
|
111
|
-
raise "unknown GRUB_TERMINAL option #{
|
113
|
+
raise "unknown GRUB_TERMINAL option #{value.inspect}"
|
112
114
|
end
|
113
115
|
end
|
114
116
|
|
@@ -127,7 +129,13 @@ module CFA
|
|
127
129
|
end
|
128
130
|
|
129
131
|
def serial_console
|
130
|
-
|
132
|
+
value_for("GRUB_SERIAL_COMMAND")
|
133
|
+
end
|
134
|
+
|
135
|
+
private
|
136
|
+
|
137
|
+
def value_for(key)
|
138
|
+
data[key].respond_to?(:value) ? data[key].value : data[key]
|
131
139
|
end
|
132
140
|
|
133
141
|
# Represents kernel append line with helpers to easier modification.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfa_grub2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cfa
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
version: 1.3.6
|
57
57
|
requirements: []
|
58
58
|
rubyforge_project:
|
59
|
-
rubygems_version: 2.
|
59
|
+
rubygems_version: 2.6.11
|
60
60
|
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: Models for GRUB2 configuration files.
|