LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2007, 03:21 AM   #1
ronerazo
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Script on event


First of all hello, i'm relatevily new to the linux os, 4 months, and well i've been working on scripts and stuff like that and i was wondering how can i run a script when an "event" happens, for instance i insert a cd rom on the tray that kind of thing.

Thanks for your time
 
Old 10-21-2007, 03:26 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well "that kind of thing" will only go so far, events need to come from somewhere, and that somewhere will change depending on what the event is. in your example, you can very easily attach scripts to cdrom tray events through the udev framework. http://reactivated.net/writing_udev_rules.html
 
  


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
HELP w/: Script for EVENT Handling!!! vitoal18t Programming 2 06-24-2009 03:36 PM
Running a custom script on USB keyboard hotplug event arobinson74 Linux - Hardware 2 10-24-2006 03:42 PM
run script at hotplug event AAnarchYY Linux - Hardware 1 07-21-2006 10:19 AM
how to run script on event ppp0 interface going down ? qwijibow Linux - Networking 4 02-24-2004 07:08 AM
Batch Script to shutdown the system in the event of power loss scottpioso Linux - Hardware 5 03-12-2003 04:40 PM


All times are GMT -5. The time now is 06:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration