summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Makefile.am21
-rw-r--r--src/plugins/smart_event.conf38
2 files changed, 51 insertions, 8 deletions
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 352c23af..543b424c 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -27,7 +27,11 @@ bin_PROGRAMS = \
pluginsconfdir = $(PLUGINS_CONF_DIR)
dist_pluginsconf_DATA = \
- Python.conf \
+ Python.conf
+
+reportpluginsconfdir = $(REPORT_PLUGINS_CONF_DIR)
+
+dist_reportpluginsconf_DATA = \
Kerneloops.conf \
Bugzilla.conf \
Upload.conf
@@ -53,7 +57,8 @@ dist_eventsconf_DATA = \
ccpp_events.conf \
mailx_events.conf \
koops_events.conf \
- rhtsupport_events.conf
+ rhtsupport_events.conf \
+ smart_event.conf
man_MANS = \
abrt-plugins.7
@@ -261,7 +266,7 @@ abrt_action_bugzilla_CPPFLAGS = \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+ -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(LIBREPORT_CFLAGS) \
-D_GNU_SOURCE \
@@ -284,7 +289,7 @@ abrt_action_rhtsupport_CPPFLAGS = \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+ -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(LIBREPORT_CFLAGS) \
$(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \
@@ -309,7 +314,7 @@ abrt_action_upload_CPPFLAGS = \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+ -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(CURL_CFLAGS) \
$(LIBREPORT_CFLAGS) \
@@ -333,7 +338,7 @@ abrt_action_kerneloops_CPPFLAGS = \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+ -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(LIBREPORT_CFLAGS) \
-D_GNU_SOURCE \
@@ -355,7 +360,7 @@ abrt_action_mailx_CPPFLAGS = \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+ -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(LIBREPORT_CFLAGS) \
-D_GNU_SOURCE \
@@ -375,7 +380,7 @@ abrt_action_print_CPPFLAGS = \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+ -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(LIBREPORT_CFLAGS) \
-D_GNU_SOURCE \
diff --git a/src/plugins/smart_event.conf b/src/plugins/smart_event.conf
new file mode 100644
index 00000000..9c23862b
--- /dev/null
+++ b/src/plugins/smart_event.conf
@@ -0,0 +1,38 @@
+# Access to /dev/sda usually requires root.
+# skdump is usually in /usr/sbin.
+# Therefore we run it as post-create event, thus: under root.
+#
+# The code is identical for all three packages.
+#
+# To be moved to the packages, so that it is (de)installed
+# together with these packages.
+
+# FIXME: not working yet, because program selection code
+# looks at dump dir BEFORE running programs,
+# thus, component is not created yet
+# (it is created by 1st program in main .conf file)
+# when program selection code looks at this file.
+
+EVENT=post-create component=gnome-disk-utility
+ which skdump >/dev/null 2>&1 || exit 0
+ for f in /dev/[sh]d[a-z]; do
+ test -e "$f" || continue
+ skdump "$f"
+ echo
+ done >smart_data
+
+EVENT=post-create component=libatasmart
+ which skdump >/dev/null 2>&1 || exit 0
+ for f in /dev/[sh]d[a-z]; do
+ test -e "$f" || continue
+ skdump "$f"
+ echo
+ done >smart_data
+
+EVENT=post-create component=udisks
+ which skdump >/dev/null 2>&1 || exit 0
+ for f in /dev/[sh]d[a-z]; do
+ test -e "$f" || continue
+ skdump "$f"
+ echo
+ done >smart_data