From e123c5f3b4bdd10f3b495a4a948f6c452ed6205f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 12 May 2011 15:44:54 +0200 Subject: add smart_event.conf Signed-off-by: Denys Vlasenko --- src/daemon/Makefile.am | 5 +++++ src/daemon/smart_event.conf | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/daemon/smart_event.conf (limited to 'src/daemon') diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 6fb107cc..7d586796 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -1,3 +1,8 @@ +eventsconfdir = $(EVENTS_CONF_DIR) + +dist_eventsconf_DATA = \ + smart_event.conf + bin_SCRIPTS = \ abrt-handle-upload diff --git a/src/daemon/smart_event.conf b/src/daemon/smart_event.conf new file mode 100644 index 00000000..e4b96b91 --- /dev/null +++ b/src/daemon/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 2>/dev/null || 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 2>/dev/null || 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 2>/dev/null || exit 0 + for f in /dev/[sh]d[a-z]; do + test -e "$f" || continue + skdump "$f" + echo + done >smart_data -- cgit