LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-29-2008, 10:08 AM   #1
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Rep: Reputation: 0
script (to mount smb) doesn't run from rc.local and only works on some machines


Ok so I have a script which runs a few other scripts (in subfolders of the first script) in order to mount some unix/linux shares) Anyway, when I run the file from rc.local and try to pipe the output into a file the file is empty and the shares are not mounted. however when I run the file it mounts everything.... any ideas?

Also, the script doesn't work on my wireless clients... any ideas?
-J
 
Old 11-29-2008, 11:59 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Please post the script plus any error messages relating to the script.
 
Old 11-29-2008, 12:45 PM   #3
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
rc.local excerpt:
<CODE>
touch /tmp/bootupmount.errorlog
echo "start">>/tmp/bootupmount.errorlog
/var/lib/mythtv/mountscript-ALL.j > /tmp/bootupmount.errorlog
echo "end" > /tmp/bootupmount.errorlog.jake
</CODE>

mountscript-all:
<CODE>
/var/lib/mythtv/music/mountscript.j
/var/lib/mythtv/pictures/mountscript.j
/var/lib/mythtv/videos/mountscript.j
</CODE>

videos/mountscript.j (all same script):
<CODE>
mount b1:/var/lib/mythtv/videos/b1 /var/lib/mythtv/videos/b1
mount b2:/var/lib/mythtv/videos/b2 /var/lib/mythtv/videos/b2
</CODE>

When I run mountscript-ALL.j they all mount fine, in RC.local they don't

Also, doesn't work on third box says
<CODE>
mount.nfs: internal error
</CODE>

and the /tmp/bootupmount.errorlog is an empty file with correct timestamp
 
Old 11-29-2008, 06:09 PM   #4
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Try using the full path for the mount command in the
videos/mountscript.j script.

Code:
#!/bin/bash
/bin/mount b1:/var/lib/mythtv/videos/b1 /var/lib/mythtv/videos/b1
/bin/mount b2:/var/lib/mythtv/videos/b2 /var/lib/mythtv/videos/b2
Also change the rc.local script to include:
Code:
touch /tmp/bootupmount.errorlog
echo "start">>/tmp/bootupmount.errorlog
/var/lib/mythtv/mountscript-ALL.j >> /tmp/bootupmount.errorlog 2>&1
echo "end" >> /tmp/bootupmount.errorlog

Last edited by Disillusionist; 11-30-2008 at 04:15 AM. Reason: I saw a couple of typos in the rc.local code
 
Old 11-29-2008, 07:15 PM   #5
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Ok, so turns out that when i ping b1 and b2 i get crazy addresses of 24.28.193.9 (what is that?) from all wireless clients regardless of OS from the router. but this doesn't happen from wired clients....
any ideas?
-J
 
Old 11-29-2008, 07:24 PM   #6
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
BTW: router running dd-wrt latest release
 
Old 11-30-2008, 04:17 AM   #7
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
Quote:
Originally Posted by WhyWontThisWork View Post
Ok, so turns out that when i ping b1 and b2 i get crazy addresses of 24.28.193.9 (what is that?) from all wireless clients regardless of OS from the router. but this doesn't happen from wired clients....
any ideas?
-J
Do you have an entry in /etc/hosts for these servers?
 
Old 11-30-2008, 09:10 AM   #8
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
I do not, I was relying on the dns of the router.... there are no entries in /etc/hosts for any of my boxes on any of my boxes...
-J
 
Old 11-30-2008, 10:51 AM   #9
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
try running nslookup from each machine and see if one machine is using a different nameserver or returning different information.

Did you get any error messages in /tmp/bootupmount.errorlog after making the changes to the rc.local script?
 
Old 11-30-2008, 12:32 PM   #10
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
<CODE>
/var/lib/mythtv/mountscript-ALL.j & >>/tmp/bootupmount.errorlog 2>&1 &
</CODE>

and I get no output (manual run mount.nfs internal error), nslookup uses same address however I get different IPs from wired and wireless clients (I looks like that might be my routers DNS server I really don't know though....?).... so it must be my routers DNS? its dd-wrt, so its linux... I have ssh access to it if there's a way that will help fix it?

-J
 
Old 11-30-2008, 01:39 PM   #11
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
I looked at the www.dd-wrt.com website, however the only documentation you can download is German (and my knowledge of German is nowhere near good enough to try reading something technical)

They do have a forum (in multiple languages) it may be worth asking the question there.

Sorry I couldn't help, not sure why you get an empty logfile, the code looks right to me.
 
Old 11-30-2008, 07:57 PM   #12
WhyWontThisWork
LQ Newbie
 
Registered: Jan 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you very much!! I've also looked through their docs and forums as well as posted it there saying that my wireless dns doesn't work, so I'm just kinda waiting for a response...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run shell script from rc.local Anshul Pathak Linux - Newbie 5 11-24-2008 12:11 PM
SMB Mount Script? Something like a batch file, how is it done? Steve88XJ Linux - General 3 03-11-2008 10:43 AM
smb mount folders disappear on mount & konqueror smb fails: network unreachable tisource Linux - Networking 1 10-17-2007 12:30 AM
clamd upgradation in remote mach through local mac by script to be run on local mach Narayandutt Programming 3 11-29-2006 10:00 AM
Logon script works for W98 NOT 2K/XP but all machines log onto the domain properly! cyberdiamond Linux - Networking 11 09-13-2005 09:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:09 PM.

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