smartd: Add options for each device being monitored
This commit is contained in:
parent
01b8c48c32
commit
e8d8b6b399
@ -24,7 +24,7 @@ let
|
|||||||
|
|
||||||
smartdConf = pkgs.writeText "smartd.conf" (concatMapStrings (device:
|
smartdConf = pkgs.writeText "smartd.conf" (concatMapStrings (device:
|
||||||
''
|
''
|
||||||
${device} -a -m root -M exec ${smartdMail}
|
${device} -a -m root -M exec ${smartdMail} ${cfg.deviceOpts}
|
||||||
''
|
''
|
||||||
) cfg.devices);
|
) cfg.devices);
|
||||||
|
|
||||||
@ -50,6 +50,17 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deviceOpts = mkOption {
|
||||||
|
default = "";
|
||||||
|
type = types.string;
|
||||||
|
example = "-o on -s (S/../.././02|L/../../7/04)";
|
||||||
|
description = ''
|
||||||
|
Additional options for each device that is monitored. The example
|
||||||
|
turns on SMART Automatic Offline Testing on startup, and schedules short
|
||||||
|
self-tests daily, and long self-tests weekly.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
devices = mkOption {
|
devices = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
example = ["/dev/sda" "/dev/sdb"];
|
example = ["/dev/sda" "/dev/sdb"];
|
||||||
|
Loading…
Reference in New Issue
Block a user