diff --git a/src/smart.c b/src/smart.c
index 7b39aaee867c83f8d5fdaa3cbb18535f19e6f58b..45bfd171275f6ae7f874fab6ffdb06bcf7ff8566 100644 (file)
--- a/src/smart.c
+++ b/src/smart.c
static const char *config_keys[] =
{
"Disk",
- "IgnoreSelected"
+ "IgnoreSelected",
+ "IgnoreSleepMode"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
static ignorelist_t *ignorelist = NULL;
+static int ignore_sleep_mode = 0;
static int smart_config (const char *key, const char *value)
{
invert = 0;
ignorelist_set_invert (ignorelist, invert);
}
+ else if (strcasecmp ("IgnoreSleepMode", key) == 0)
+ {
+ if (IS_TRUE (value))
+ ignore_sleep_mode = 1;
+ }
else
{
return (-1);
DEBUG ("smart plugin: disk %s has no SMART support.", dev);
goto end;
}
- if (sk_disk_check_sleep_mode (d, &awake) < 0 || !awake)
+ if (!ignore_sleep_mode)
{
- DEBUG ("smart plugin: disk %s is sleeping.", dev);
- goto end;
+ if (sk_disk_check_sleep_mode (d, &awake) < 0 || !awake)
+ {
+ DEBUG ("smart plugin: disk %s is sleeping.", dev);
+ goto end;
+ }
}
if (sk_disk_smart_read_data (d) < 0)
{