carnac 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/carnac CHANGED
@@ -20,8 +20,8 @@ OptionParser.new do |opts|
20
20
  options[:notify] = v
21
21
  end
22
22
 
23
- opts.on("-x", "-- EMAIL", String, "") do |v|
24
- options[:notify] = v
23
+ opts.on("-t", "--type TYPE", String, "The type of device (auto/test/ata/scsi) to check") do |v|
24
+ options[:type] = v
25
25
  end
26
26
  end.parse!
27
27
 
data/lib/carnac/check.rb CHANGED
@@ -36,10 +36,10 @@ END_OF_MESSAGE
36
36
  end
37
37
 
38
38
  def run!
39
- if @flags.empty?
40
- lines = `smartctl -a #{@device}`.split("\n")
39
+ if @type.empty?
40
+ lines = `smartctl -a -d #{@device}`.split("\n")
41
41
  else
42
- lines = `smartctl -a #{@flags} #{@device}`.split("\n")
42
+ lines = `smartctl -a #{@type} #{@device}`.split("\n")
43
43
  end
44
44
 
45
45
  header = lines.grep(/^ID#/).first
@@ -1,3 +1,3 @@
1
1
  module Carnac
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: