Lines 5-11
Link Here
|
5 |
|
5 |
|
6 |
<ivm:Match name="matchname" value="matchvalue"> |
6 |
<ivm:Match name="matchname" value="matchvalue"> |
7 |
<ivm:Condition name="conditionname1" exec="command1" /> |
7 |
<ivm:Condition name="conditionname1" exec="command1" /> |
8 |
<ivm:Condition name="conditionname2" exec="command2" /> |
8 |
<ivm:Condition name="conditionname2" value="value2" exec="command2" /> |
9 |
</ivm:Match> |
9 |
</ivm:Match> |
10 |
|
10 |
|
11 |
What does this actually mean? Well, when a device emits a condition, |
11 |
What does this actually mean? Well, when a device emits a condition, |
Lines 13-18
Link Here
|
13 |
matches the name of the condition, then 'command1' will be |
13 |
matches the name of the condition, then 'command1' will be |
14 |
executed. |
14 |
executed. |
15 |
|
15 |
|
|
|
16 |
If 'value' is set the condition detail will also have to match. |
17 |
|
16 |
Matches can be nested. See the examples. |
18 |
Matches can be nested. See the examples. |
17 |
|
19 |
|
18 |
If a condition matches multiple times, all matching commands will be |
20 |
If a condition matches multiple times, all matching commands will be |
Lines 36-46
Link Here
|
36 |
|
38 |
|
37 |
<!-- Shut down when power button is pressed. This and the rest of the ACPI |
39 |
<!-- Shut down when power button is pressed. This and the rest of the ACPI |
38 |
stuff needs HAL 0.5 or better to work. Also, /sbin/shutdown needs to be |
40 |
stuff needs HAL 0.5 or better to work. Also, /sbin/shutdown needs to be |
39 |
in /etc/sudoers for whatever user Ivman runs as. --> |
41 |
in /etc/sudoers for whatever user Ivman runs as. --> |
40 |
<!-- |
42 |
<!-- |
41 |
<ivm:Match name="hal.info.udi" value="/org/freedesktop/Hal/devices/acpi_PWRF"> |
43 |
<ivm:Match name="hal.info.udi" value="/org/freedesktop/Hal/devices/acpi_PWRF"> |
42 |
<ivm:Condition name="ButtonPressed" exec="/usr/bin/sudo /sbin/shutdown" /> |
44 |
<ivm:Condition name="ButtonPressed" exec="/usr/bin/sudo /sbin/shutdown" /> |
43 |
</ivm:Match> |
45 |
</ivm:Match> |
44 |
--> |
46 |
--> |
45 |
|
47 |
|
|
|
48 |
<!-- Shut down on both frontpanel 'power' button and 'power' key on keyboard, |
49 |
and hibernate on 'sleep' key. --> |
50 |
<!-- |
51 |
<ivm:Condition name="ButtonPressed" value="power" exec="/usr/bin/sudo /sbin/shutdown -h now"/> |
52 |
<ivm:Condition name="ButtonPressed" value="sleep" exec="/usr/bin/sudo /usr/sbin/hibernate"/> |
53 |
--> |
54 |
|
46 |
</ivm:ConditionsConfig> |
55 |
</ivm:ConditionsConfig> |