cfa_grub2 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 +4 -4
- data/lib/cfa/grub2/grub_cfg.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dddfc4f4aa967d40e732d29ea51769cd78f7366
|
4
|
+
data.tar.gz: 172b8b3fcdb840ea5428d904baeae03327b9b8fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a737d250e7b19ebd4d559d39c2fac8ebc298ac757037055d3a156f53416becca199c17c7449c8c6b480e479c8a7b61c8a4ea20dcbac2f2a7995e4b8371b6d52c
|
7
|
+
data.tar.gz: 4733527d1d2f6f2c0dee8a4369c1358a6310388cb6f00ae61f2e52425be896bab14604527327309898eb6a807c06f6c51d02c1ed02082bb41742ceb091e57298
|
data/lib/cfa/grub2/grub_cfg.rb
CHANGED
@@ -15,9 +15,10 @@ module CFA
|
|
15
15
|
submenu = ""
|
16
16
|
string.lines.each_with_object([]) do |line, result|
|
17
17
|
case line
|
18
|
-
when /menuentry\s
|
18
|
+
when /menuentry\s+'/ then result << parse_entry(line, submenu)
|
19
19
|
when /^}\s*\n/ then submenu = ""
|
20
|
-
when /submenu\s
|
20
|
+
when /submenu\s+'/
|
21
|
+
submenu = line[/\s*submenu\s+'([^']+)'.*/, 1]
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
@@ -54,6 +55,10 @@ module CFA
|
|
54
55
|
# @return [Array<Hash>] return boot entries containing `title:` as shown
|
55
56
|
# on screen and `path:` whole path usable for grub2-set-default including
|
56
57
|
# also submenu part of path
|
58
|
+
# @note Some entries are not in fact bootable, such as the
|
59
|
+
# "run snaper rollback" hint-only entry on SUSE. They are ignored.
|
60
|
+
# As a hack, they are recognized by double quote delimiters while the
|
61
|
+
# regular entries use single quotes.
|
57
62
|
def boot_entries
|
58
63
|
data
|
59
64
|
end
|
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.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josef Reidinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cfa
|