aboutsummaryrefslogtreecommitdiff
blob: 9f680bae47c28cfd15ce03ef4e51440483c22d3c (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From a4d4c67a87e859d5a3099c79fb555084e51c5288 Mon Sep 17 00:00:00 2001
From: Saleem Abdulrasool <compnerd@compnerd.org>
Date: Sat, 31 Jan 2009 14:44:24 -0800
Subject: [PATCH 46/48] add exhebro policies

---
 fdi/policy/10osvendor/20-storage-methods.fdi       |    5 +++++
 .../10osvendor/99-storage-policy-fixed-drives.fdi  |   12 ++++++++++++
 fdi/policy/10osvendor/Makefile.am                  |    3 ++-
 hal.conf.in                                        |   10 ++++++++++
 4 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi

diff --git a/fdi/policy/10osvendor/20-storage-methods.fdi b/fdi/policy/10osvendor/20-storage-methods.fdi
index 9fbe202..8373ba8 100644
--- a/fdi/policy/10osvendor/20-storage-methods.fdi
+++ b/fdi/policy/10osvendor/20-storage-methods.fdi
@@ -153,6 +153,11 @@
 	</match>
       </match>
 
+      <!-- Hide partitons marked as compaq diagnostics -->
+      <match key="volume.partition.type" string="0x12">
+         <merge key="volume.ignore" type="bool">true</merge>
+      </match>
+
       <!-- EFI firmware partitions -->
       <match key="volume.fstype" string="vfat">
 	<match key="volume.label" string="EFI">
diff --git a/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi b/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi
new file mode 100644
index 0000000..1c4d201
--- /dev/null
+++ b/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- -*- SGML -*- -->
+
+<deviceinfo version="0.2">
+  <device>
+    <match key="@block.storage_device:storage.hotpluggable" bool="false">
+      <match key="@block.storage_device:storage.removable" bool="false">
+        <merge key="volume.ignore" type="bool">true</merge>
+      </match>
+    </match>
+  </device>
+</deviceinfo>
+
diff --git a/fdi/policy/10osvendor/Makefile.am b/fdi/policy/10osvendor/Makefile.am
index a30aac0..816b0a9 100644
--- a/fdi/policy/10osvendor/Makefile.am
+++ b/fdi/policy/10osvendor/Makefile.am
@@ -11,7 +11,8 @@ dist_fdi_DATA = 			\
 	10-x11-input.fdi		\
 	15-storage-luks.fdi		\
 	20-storage-methods.fdi		\
-	30-wol.fdi
+	30-wol.fdi			\
+	99-storage-policy-fixed-drives.fdi
 
 if BUILD_KEYMAPS
 dist_fdi_DATA += 10-keymap.fdi
diff --git a/hal.conf.in b/hal.conf.in
index bfd6511..a84f720 100644
--- a/hal.conf.in
+++ b/hal.conf.in
@@ -63,5 +63,15 @@
     <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
   </policy>
 
+  <!-- exherbo policies -->
+  <!-- allow plugdev to manage volumes and power management -->
+  <policy group="plugdev">
+    <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
+    <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+
+    <allow send_interface="org.freedesktop.Device.LaptopPanel"/>
+    <allow send_interface="org.freedesktop.Device.SystemPowerManagement"/>
+  </policy>
+
 </busconfig>
 
-- 
1.6.1.2