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 04-04-2007, 11:33 AM   #1
hceuterpe
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
Automatically run command on device add


I would like to setup my linux 2.4 system to automatically run a given command whenever I connect a particular USB device (specifically would be USB-serial adapter). Is something like this possible?
 
Old 04-05-2007, 08:25 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Welcome to LQ!

I'm pretty sure that you can do that through a custom udev rule. The issue would be that you would need to move to a 2.6 kernel. I don't think (although I may be wrong) that udev really works well under a 2.4 kernel.

I've seen at least one thread recently on how to run a script from udev, so you might try doing a forum search.
 
Old 04-05-2007, 09:22 AM   #3
hceuterpe
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Is this it

I think I found a solution:

http://www.greenfly.org/tips/usb_drive.html
It's using hotplug for USB. Wouldn't this work?
 
Old 04-05-2007, 01:47 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
That approach would probably work. I've never messed with hotplug, so I can't say for sure.
 
  


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
How to re-run a command every x seconds automatically? Akhran Linux - Newbie 4 08-22-2006 11:58 PM
Run Command on boot automatically qqcoisa Linux - Hardware 1 03-20-2006 01:27 AM
How to run a command automatically on start up TKD Suse/Novell 6 11-03-2005 05:41 AM
How can I run a command automatically at startup? luwigie Linux - General 8 08-26-2004 10:05 PM
? to add a command to execute automatically when xwindows loads up Kasperisa Linux - Newbie 2 08-02-2003 11:16 AM


All times are GMT -5. The time now is 10:00 AM.

Main Menu
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