You are not logged in.

#1 2005-05-25 09:20:09

timmy
Member
From: Christiansfeld - Denmark
Registered: 2005-01-25
Posts: 45
Website

Hotplug and MP3 player

Ok, I wanted to do some fancy stuff, with my MP3 player, but the first step was off course to get it to automatically mount the device and umount it when disconnected, checked lsusb, which generated this:

Bus 001 Device 006: ID 041e:4116 Creative Technology, Ltd 
Bus 001 Device 002: ID 046d:c508 Logitech, Inc. 
Bus 001 Device 001: ID 0000:0000

As far as I've read, I should then put a line in /etc/hotplug/usb.usermap, which looked like this:

muvo    0x0003 0x041e 0x4116 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x0

And it should execute the script called muvo which should be located in /etc/hotplug/usb/, well, it didn't hmm
I tried several times, with very fancy selfmade and downloaded scripts.
I also tried the simple version to simply execute:

#!/bin/sh
echo 1 > /home/mnv/file

And /home/mnv/file of course had -rwxrwxrwx

Every script I have tried to run with hotplug, has execute rights.

Of course I checked that hotplug was started, and also restarted after each and every single change.
My hotplug doesn't seem to log to anywhere, and I've search google for a config option to do this, but with no luck.

Is there anybody who can point me anywhere, for a hint or some usefull tricks, I think I've debug very good, but it just doesn't seem to execute the script.

Thanks in advance


Know your rights - http://rwxr-xr-x.dk

Offline

#2 2005-05-25 10:46:38

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Hotplug and MP3 player

Hotplug doesnt mount things, thats what ivman/gnome-volume-manager do.

pacman -S ivman, follow the instructions to config it, and start /etc/rc.d/dbus,hal,ivman

iphitus

Offline

#3 2005-05-25 11:08:37

timmy
Member
From: Christiansfeld - Denmark
Registered: 2005-01-25
Posts: 45
Website

Re: Hotplug and MP3 player

Well hotplug should execute a script when the device is connected right, and execute another one when it is removed, or have I completely misunderstand something?


Know your rights - http://rwxr-xr-x.dk

Offline

#4 2005-05-25 11:41:45

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Hotplug and MP3 player

Yes, that's right. But unmounting a fs of a device which is gone isn't a good idea, always first umount before unplugging it, or you may lose data.

You can make a script with the same name as the module in /etc/hotplug/usb/, but a better idea is to make a script for /etc/dev.d/ which is executed by udev when the device (dis)appears. Just after loading the module the device may not exist yet in /dev, so that's why it's better to rely on udev, if you use that.

Offline

#5 2005-05-25 11:52:14

timmy
Member
From: Christiansfeld - Denmark
Registered: 2005-01-25
Posts: 45
Website

Re: Hotplug and MP3 player

Well I do not use UDEV, but it really wouldn't help me out much as far as I can see, since my script for mounting the device, never executes.


Know your rights - http://rwxr-xr-x.dk

Offline

#6 2005-05-25 12:14:54

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Hotplug and MP3 player

why dont you start using udev? imho, its much better than devfs

either way, ivman is an awesome tool, i use it here and it works every time.

Offline

#7 2005-05-25 12:23:08

timmy
Member
From: Christiansfeld - Denmark
Registered: 2005-01-25
Posts: 45
Website

Re: Hotplug and MP3 player

iphitus wrote:

why dont you start using udev? imho, its much better than devfs

either way, ivman is an awesome tool, i use it here and it works every time.

Maeby I should start using UDEV smile

But anyway, thanks for your info, regarding ivman, maeby I'll try that out. But damn it annoys me that this doesn't work


Know your rights - http://rwxr-xr-x.dk

Offline

#8 2005-05-25 12:48:00

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Hotplug and MP3 player

If you install udev, you may find writing udev rules interesting.

Offline

#9 2005-05-25 20:27:46

timmy
Member
From: Christiansfeld - Denmark
Registered: 2005-01-25
Posts: 45
Website

Re: Hotplug and MP3 player

Well, at home again, just checked, it doesn't even say anything in /bvar/log/messages.log


Know your rights - http://rwxr-xr-x.dk

Offline

Board footer

Powered by FluxBB