summaryrefslogtreecommitdiffstats
path: root/src/daemon/smart_event.conf
blob: e4b96b917d2514a6f149ca4096258fc864fb2ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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