LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-04-2005, 05:16 AM   #1
bbenn
LQ Newbie
 
Registered: Sep 2005
Posts: 7

Rep: Reputation: 0
automounting usbkey using udev


Hi ,
I am trying to get a usbkey automatically mounted to the fs when plugin.

After reading many postings.
Using below udev rule I get a /mnt/mp3 directory created:
KERNEL="sd*", SYSFS{product}="<USB PRODUCT> ", NAME="%k", SYMLINK="mp3"-%m, OPTIONS="last_rule"
then with mount /dev/sda.... I can mount the usbkey.

What I'd like to do is to modify the udev rule to:
KERNEL="sd*", SYSFS{product}="<USB PRODUCT> ", SYMLINK="mp3-%m", PROGRAM="/usr/bin/AA", OPTIONS="last_rule"

where /usr/bin/AA is my mount script.

#!/bin/sh

if [ $ACTION ="add" ]
then
pmount $DEVPATH$DEVNAME
else
pumount -l $DEVNAME
fi

Above script doesn't work. I am quite new to Linux, any suggestions much appreciated.

Ben
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Udev upgrade breaks automounting memory cards on Gentoo FreeThinkerJim Linux - Hardware 2 05-27-2006 11:41 AM
automounting, udev, etc. mekoc Slackware 1 11-08-2005 07:38 AM
Slackware image on usbkey DarkNeo Linux - Software 5 08-15-2005 07:44 AM
usbkey only works once after boot jkobrien Linux - Hardware 6 01-06-2005 06:41 AM
Usbkey Lobais Linux - Hardware 3 09-28-2004 09:28 AM


All times are GMT -5. The time now is 11:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration