idrac 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/idrac +11 -5
- data/lib/idrac/firmware.rb +2 -1
- data/lib/idrac/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad668d80e3824d65d43da614767040617ee8e606c613105aa56f6949d8fb5e00
|
4
|
+
data.tar.gz: 62d065f745bc38db6e508bccb79ebecefceb92dfadad409c89b6086b23ba2ca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e6b60bb9a25dad0e85de333297df4cd7708591dc86b79afae0beacad4f016ee6d70395279d57635eeada4eaf604dbfdcf091fe195becf6242275067017cfa3
|
7
|
+
data.tar.gz: ce9a0577803fced25c6f89c77d451ac9776f9ce15bd840f48184a3ea4f0b810151ff6e8863468b5cac5f0e4401534033314839fa0cd35075202fd08488de2168
|
data/bin/idrac
CHANGED
@@ -75,9 +75,12 @@ module IDRAC
|
|
75
75
|
puts " #{fw[:name]}: #{fw[:version]} (#{fw[:updateable] ? 'Updateable' : 'Not Updateable'})"
|
76
76
|
end
|
77
77
|
|
78
|
+
# Default catalog location is now ~/.idrac/Catalog.xml
|
79
|
+
default_catalog = File.expand_path("~/.idrac/Catalog.xml")
|
80
|
+
|
78
81
|
# Check for updates if catalog is available
|
79
|
-
if options[:catalog] || File.exist?(
|
80
|
-
catalog_path = options[:catalog] ||
|
82
|
+
if options[:catalog] || File.exist?(default_catalog)
|
83
|
+
catalog_path = options[:catalog] || default_catalog
|
81
84
|
puts "\nChecking for updates using catalog: #{catalog_path}"
|
82
85
|
|
83
86
|
updates = firmware.check_updates(catalog_path)
|
@@ -110,9 +113,12 @@ module IDRAC
|
|
110
113
|
begin
|
111
114
|
catalog_path = options[:catalog]
|
112
115
|
|
113
|
-
#
|
114
|
-
|
115
|
-
|
116
|
+
# Default catalog location is now ~/.idrac/Catalog.xml
|
117
|
+
default_catalog = File.expand_path("~/.idrac/Catalog.xml")
|
118
|
+
|
119
|
+
# If no catalog specified, check if one exists in the default location
|
120
|
+
if catalog_path.nil? && File.exist?(default_catalog)
|
121
|
+
catalog_path = default_catalog
|
116
122
|
end
|
117
123
|
|
118
124
|
# If still no catalog, download it
|
data/lib/idrac/firmware.rb
CHANGED
@@ -37,7 +37,8 @@ module IDRAC
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def download_catalog(output_dir = nil)
|
40
|
-
|
40
|
+
# Use ~/.idrac as the default directory
|
41
|
+
output_dir ||= File.expand_path("~/.idrac")
|
41
42
|
FileUtils.mkdir_p(output_dir) unless Dir.exist?(output_dir)
|
42
43
|
|
43
44
|
catalog_gz_path = File.join(output_dir, "Catalog.xml.gz")
|
data/lib/idrac/version.rb
CHANGED