Search:  
Gentoo Wiki

TIP_HAL_DVD_and_DVDR_Links

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

After a lot of googling, couldn't seem to do it the right way so here's the less right one. It's pretty simpe actually, simply edit /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi, find this:

File: /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi
    <!-- Handle drives with non-partitioned media  -->
    <match key="storage.no_partitions_hint" bool="true">
      <!-- optical drives -->
      <match key="storage.drive_type" string="cdrom">
	<merge key="storage.policy.mount_filesystem" type="string">auto</merge>
	<merge key="storage.policy.desired_mount_point" type="string">cdrom</merge>
	<match key="storage.cdrom.cdr" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="storage.cdrom.cdrw" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="storage.cdrom.dvdplusr" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="storage.cdrom.dvdplusrw" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="storage.cdrom.dvdram" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="storage.cdrom.dvdr" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="storage.cdrom.dvdrw" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
	</match>
	<match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
	  <merge key="storage.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
	</match>
      </match>

And make it look like:

File: /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi
    <!-- Handle drives with non-partitioned media  -->
    <match key="storage.no_partitions_hint" bool="true">
      <!-- optical drives -->
      <match key="storage.drive_type" string="cdrom">
	<merge key="storage.policy.mount_filesystem" type="string">auto</merge>
	<merge key="storage.policy.desired_mount_point" type="string">dvd</merge>
	<match key="storage.cdrom.cdr" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="storage.cdrom.cdrw" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="storage.cdrom.dvdplusr" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="storage.cdrom.dvdplusrw" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="storage.cdrom.dvdram" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="storage.cdrom.dvdr" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="storage.cdrom.dvdrw" bool="true">
	  <merge key="storage.policy.desired_mount_point" type="string">dvdr</merge>
	</match>
	<match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
	  <merge key="storage.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
	</match>
      </match>
Note: Mine was at /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi - does anyone know how these filepaths are allocated?

If anyone can point out a correct way to do this, I would appreciate...

Edit /etc/hal/fdi/policy/preferences.fdi, you may need to create it first. It uses the same Syntax as /usr/share/hal/fdi/... files. This way your conf wont get lost on next update.

Retrieved from "http://www.gentoo-wiki.info/TIP_HAL_DVD_and_DVDR_Links"

Last modified: Thu, 18 Jan 2007 02:13:00 +0000 Hits: 15,288