Skip to content

Commit

Permalink
Merge pull request jhoblitt#1 from ucam-cl-dtg/master
Browse files Browse the repository at this point in the history
Test for megaraid device symbols being :undefined in smartd.conf template
  • Loading branch information
jhoblitt committed May 15, 2013
2 parents 9982990 + 3463290 commit 56c987b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/smartd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ DEFAULT -m <%= @mail_to %> -M <%= @warning_schedule %>
<% megaraid_adapters = scope.lookupvar('::megaraid_adapters')
megaraid_device = scope.lookupvar('::megaraid_virtual_drives')
megaraid_drives = scope.lookupvar('::megaraid_physical_drives')
megaraid_device = megaraid_device.split(/,/)[0]
megaraid_drives = megaraid_drives.nil? ? [] : megaraid_drives.split(/,/)
megaraid_device = megaraid_device == :undefined ? "" : megaraid_device.split(/,/)[0]
megaraid_drives = megaraid_drives == :undefined ? [] : megaraid_drives.split(/,/)

if megaraid_device and megaraid_device != '' and
megaraid_adapters and megaraid_adapters.to_i > 0 -%>
Expand Down

0 comments on commit 56c987b

Please sign in to comment.