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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-29-2008, 11:08 AM
|
#1
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Rep:
|
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
|
|
|
11-29-2008, 12:59 PM
|
#2
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
Please post the script plus any error messages relating to the script.
|
|
|
11-29-2008, 01:45 PM
|
#3
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Original Poster
Rep:
|
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
|
|
|
11-29-2008, 07:09 PM
|
#4
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
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 05:15 AM.
Reason: I saw a couple of typos in the rc.local code
|
|
|
11-29-2008, 08:15 PM
|
#5
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Original Poster
Rep:
|
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
|
|
|
11-29-2008, 08:24 PM
|
#6
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Original Poster
Rep:
|
BTW: router running dd-wrt latest release
|
|
|
11-30-2008, 05:17 AM
|
#7
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
Quote:
Originally Posted by WhyWontThisWork
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?
|
|
|
11-30-2008, 10:10 AM
|
#8
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Original Poster
Rep:
|
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
|
|
|
11-30-2008, 11:51 AM
|
#9
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
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?
|
|
|
11-30-2008, 01:32 PM
|
#10
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Original Poster
Rep:
|
<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
|
|
|
11-30-2008, 02:39 PM
|
#11
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
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.
|
|
|
11-30-2008, 08:57 PM
|
#12
|
LQ Newbie
Registered: Jan 2008
Posts: 10
Original Poster
Rep:
|
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...
|
|
|
All times are GMT -5. The time now is 01:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|