Re: Adding rules, scripts, etc. to udev/hal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 12 December 2007, Serguei Miridonov wrote:
> The situation: External USB hard drive (WD Passport) mounts
> automatically when connected, works OK, and unmounts when
> choosing "Safely Remove" on the icon menu...
>
> However, it does not stop spinning after unmounting and
> disconnecting the USB cable makes the drive to do emergency
> heads parking. To stop the drive I have to use "sdparm -C
> stop /dev/sdb" before disconnecting.
>
> Is there any way to do this automatically? Any user guide to
> udev/hal subsystems?
>
> Thanks.

I tried to rewrite HAL rules with attached 
files /etc/hal/fdi/policy/50-wdpassport.fdi 
and /usr/lib/hal/scripts/hal-wdpassport-remove but it does not help. 
The drive makes an attempt to stop spinning but it seems hal or udev 
touch it again and it continue to spin.

Any help?

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
  <device>
    <match key="@info.parent:storage.hotpluggable" bool="true">
      <match key="info.product" string="WD Passport">
        <!--append key="info.callouts.remove" type="strlist">hal-wdpassport-remove</append-->
        <remove key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Unmount</remove>
        <remove key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</remove>
        <remove key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</remove>
        <remove key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-unmount</remove>
        
        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Unmount</append>
        <append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">none</append>
        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-wdpassport-remove</append>
      </match>
    </match>
  </device>
</deviceinfo>

Attachment: hal-wdpassport-remove
Description: application/shellscript

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux