From cff07b040193779e147b5a13013f085dfbebf62b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 6 May 2025 09:09:53 +0200 Subject: [PATCH] sysutils/smart: add errors:no here too --- sysutils/smart/Makefile | 1 + .../service/conf/actions.d/actions_smart.conf | 27 ++++++++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sysutils/smart/Makefile b/sysutils/smart/Makefile index 2afa17e45..23820a8df 100644 --- a/sysutils/smart/Makefile +++ b/sysutils/smart/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= smart PLUGIN_VERSION= 2.3 +PLUGIN_REVISION= 1 PLUGIN_COMMENT= SMART tools PLUGIN_DEPENDS= smartmontools PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf b/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf index 03a594580..b24bc6d56 100644 --- a/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf +++ b/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf @@ -12,59 +12,68 @@ message:list installed devices [info] command:/usr/local/sbin/smartctl -parameters:-%s %s; exit 0 +parameters:-%s %s +errors:no type:script_output message:exec smartctl -%s for device %s [info_json] command:/usr/local/sbin/smartctl -parameters:-%s --json=c %s; exit 0 +parameters:-%s --json=c %s +errors:no type:script_output message:exec smartctl -%s (JSON) for device %s [log.error] command:/usr/local/sbin/smartctl -l error -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Get error log for device %s [log.selftest] command:/usr/local/sbin/smartctl -l selftest -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Get selftest log for device %s [test.offline] command:/usr/local/sbin/smartctl -t offline -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Testing device %s (offline) description:Run SMART test (offline) [test.short] command:/usr/local/sbin/smartctl -t short -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Testing device %s (short) description:Run SMART test (short) [test.long] command:/usr/local/sbin/smartctl -t long -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Testing device %s (long) description:Run SMART test (long) [test.conveyance] command:/usr/local/sbin/smartctl -t conveyance -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Testing device %s (conveyance) description:Run SMART test (conveyance) [abort] command:/usr/local/sbin/smartctl -X -parameters:%s; exit 0 +parameters:%s +errors:no type:script_output message:Abort test on device %s description:Abort SMART tests