LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-10-2003, 02:00 AM   #1
fiending
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Rep: Reputation: 0
Script making in Linux


I made a script with one line in it. That line is:

/etc/ndiswrapper/loaddriver 14e4 4320 /etc/ndiswrapper/bcmw15.sys /etc/ndiswrapper/bcmw15.inf

the thing is that this command runs fine in the command prompt, but when ran as a script it gives the error "unable to open driver: no such file or directory".

this error is given whenever the .sys or .inf paths are incorrect when entered at command line. i cannot figure out why when this is put into a script it should make any difference. can anyone help me?
 
Old 12-10-2003, 04:30 AM   #2
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Hi,

All I can think of is, did you include a shebang in your script?

#!/bin/tcsh or #!/bin/bash, or whatever shell you use.

John
 
Old 12-10-2003, 08:21 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Did you make it executable as well? chmod +x <filename>
 
Old 12-10-2003, 01:34 PM   #4
fiending
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I tried including the shebang and that didn't work and I tried chmod the files and that didnt work as well. the program is executing just not finding the paths i put in the script
 
Old 12-10-2003, 02:07 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by fiending
I tried including the shebang and that didn't work and I tried chmod the files and that didnt work as well. the program is executing just not finding the paths i put in the script
So your file you created looks like this right:
Code:
#!/bin/bash
#
/etc/ndiswrapper/loaddriver 14e4 4320 /etc/ndiswrapper/bcmw15.sys /etc/ndiswrapper/bcmw15.inf
And you chmodded the file so it is executable?

What happens if you try something like this instead:
Code:
#!/bin/bash
#
localdir=/etc/ndiswrapper

$localdir/loaddriver 14e4 4320
$localdir/bcmw15.sys
$localdir/bcmw15.inf

# End of script.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help in making script depam Linux - Software 1 10-19-2005 07:40 PM
Making a new script Lostboys Slackware 9 09-07-2004 06:11 AM
making a script 'global' fatherg Linux - General 3 08-08-2004 07:40 AM
Making shell script a part of linux image mayureshchitale Linux - Newbie 1 07-06-2004 01:00 AM
making my script generic bluecadet Programming 2 01-16-2002 12:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:16 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
Open Source Consulting | Domain Registration