LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 11-02-2012, 01:11 AM   #1
jyotir.roy
LQ Newbie
 
Registered: Nov 2012
Posts: 12

Rep: Reputation: Disabled
want to application from script


Hi,

I have a script /etc/udev/rules.d/ra_insmod.sh and it's been run whenever I insert wifi dongle and insmod some .ko.
I have a application as /usr/sbin/wutil
I want to send parameter from this script this application.

vi /etc/udev/rules.d/ra_insmod.sh

/sbin/insmod /etc/Wireless/Ralink/rtutil3572sta.ko --> this is working
/usr/sbin/wutil EVENT PLUGIN --> this is not working

But it is working when I run manually from root

Can you help me to run wutil from ra_insmod.sh
 
Old 11-02-2012, 06:23 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,778
Blog Entries: 4

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
vi /etc/udev/rules.d/ra_insmod.sh

/sbin/insmod /etc/Wireless/Ralink/rtutil3572sta.ko --> this is working
/usr/sbin/wutil EVENT PLUGIN --> this is not working
Do you mean, you have placed both insmod and wutil commands inside the script ra_insmod.sh, and want to invoke both using this script? If it is, then share that what error you're getting on line /usr/sbin/wutil EVENT PLUGIN?
Also did you try to debug this script using a set -xv? Once try it, as it will help you that where your script stuck. To me, it sounds some pb with permissions on wutil, but first you will need to do what's said above.
 
1 members found this post helpful.
Old 11-02-2012, 02:19 PM   #3
DutchGeek
Member
 
Registered: Sep 2006
Distribution: SuSE, Slackware
Posts: 51

Rep: Reputation: 4
Where did you declare the EVENT PLUGIN variable? did you declare it correctly?
I am not sure, but i think in bash variables should be with no space, e.g:
Code:
EVEN_PLUGIN = <something>
then when you refer to it, you should use a dollar sign:
Code:
/usr/sbin/wutil $EVENT_PLUGIN
 
1 members found this post helpful.
Old 11-04-2012, 07:37 PM   #4
jyotir.roy
LQ Newbie
 
Registered: Nov 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
want to application from script

Hi All,

Thanks for your valuable input.

Now it's working. I need to give full path of the application where it's been stored.

/usr/sbin/wutil EVENT PLUGIN

Thanks Again.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script is not exiting when ran from some other application xombboxer Linux - Newbie 2 10-09-2012 08:44 AM
Shell Script: Getting signal handlers to work when running an application by script pkjss Programming 4 09-14-2011 04:23 AM
[SOLVED] Controlling a GUI application from a script helger Linux - Software 7 05-18-2010 08:35 AM
linux startup script for my application Linux Duke Linux - Server 3 08-23-2009 04:30 PM
start application using shell script Skiltron Linux - Software 2 12-24-2008 12:51 PM


All times are GMT -5. The time now is 04:53 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