diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-12 15:44:54 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-12 15:44:54 +0200 |
commit | e123c5f3b4bdd10f3b495a4a948f6c452ed6205f (patch) | |
tree | f12d22b50ce029310c08988372c6d0721d5e9571 /src/daemon | |
parent | e9f36a1f33bfa043048578e8f49cade74c9f182d (diff) | |
download | abrt-e123c5f3b4bdd10f3b495a4a948f6c452ed6205f.tar.gz abrt-e123c5f3b4bdd10f3b495a4a948f6c452ed6205f.tar.xz abrt-e123c5f3b4bdd10f3b495a4a948f6c452ed6205f.zip |
add smart_event.conf
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/Makefile.am | 5 | ||||
-rw-r--r-- | src/daemon/smart_event.conf | 38 |
2 files changed, 43 insertions, 0 deletions
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 |