PDA

Bekijk de volledige versie : rc.local in the /shares/MYVOLUME1/MYSHARE1/web



fragir
24-05-2008, 21:18
Help, please. There is a WL-700ge with custom firmware 1.0.7.8. I need to add some new routes into the routing table. According to tutorial from kfurge: "startup scripts look for an rc.local in either /shares/MYVOLUME1 or /shares/MYVOLUME1/MYSHARE1/web and executes it."
Such file is absent at both these paths. So, I create it manually with the next content:

route add -net 10.0.0.0/8 gw 10.9.70.1
route add -net 77.50.0.0/16 gw 10.9.70.1
route add -net 192.168.0.0/16 gw 10.9.70.1
route add -net 217.197.112.0/23 gw 10.9.70.1
route add -net 89.222.178.128/25 gw 10.9.70.1

Then reboot device and... nothing happens :( According to "route -n" result there are no any new routes in the kernel's IP routing table. What I'm doing wrong?

mumsoft
24-05-2008, 22:24
Help, please. There is a WL-700ge with custom firmware 1.0.7.8. I need to add some new routes into the routing table. According to tutorial from kfurge: "startup scripts look for an rc.local in either /shares/MYVOLUME1 or /shares/MYVOLUME1/MYSHARE1/web and executes it."
Such file is absent at both these paths.[cut] What I'm doing wrong?

You are reading the old instructions for the 1.0.4.6 custom firmware.:p
The new rc.local is in /opt/etc. But before you try to ad something to it, take your time to read this:
http://wl700g.homelinux.net/drupal/?q=node/134

You're welcome!
Marc

fragir
25-05-2008, 08:43
Thank you very much. But now, - when I tried to edit rc.local:

[root@WL700gE etc]$ ls
cron.d init.d ld.so.cache rc.local termcap
crontab init.kc ld.so.conf shells wgetrc
dropbear ipkg.conf profile sudoers
[root@WL700gE etc]$
[root@WL700gE etc]$ echo "route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.70.1" >> /opt/etc/rc.local
bash: echo: write error: Invalid argument

Sorry for dummy questions, unfortunately, I'm absolute newbie in linux.

fragir
25-05-2008, 09:51
And, beside that, it looks like I have no access to write despite of root's rights:

[root@WL700gE etc]$ cp /opt/etc/rc.local /opt/etc/rc.local-furge
cp: cannot remove '/opt/etc/rc.local-furge': No such file or directory

[root@WL700gE etc]$ echo "" >> rc.local-furge
bash: rc.local-furge: Permission denied

Why it can be?

mumsoft
25-05-2008, 13:14
And, beside that, it looks like I have no access to write despite of root's rights:

[root@WL700gE etc]$ cp /opt/etc/rc.local /opt/etc/rc.local-furge
cp: cannot remove '/opt/etc/rc.local-furge': No such file or directory

[root@WL700gE etc]$ echo "" >> rc.local-furge
bash: rc.local-furge: Permission denied

Why it can be?

This is a trap so many people fall in. That's why I told you this:

But before you try to ad something to it, take your time to read this:
http://wl700g.homelinux.net/drupal/?q=node/134

As you obviously did not bother or are in a hurry, you could jump straight ahead to: http://wl700g.homelinux.net/drupal/?q=node/187

Good luck,
Marc

fragir
25-05-2008, 19:47
Thank you very much - I've missed that. Well, now all it's about OK, but a bit strange. After the routs adding, if I have my wl700 in WAN-AutomaticIP and after that start VPN(PPTP)-connection from computer - there are both local and internet access from computer, but no internet access from wl700. If I switch in WAN-PPTP - there is internet only both for wl700 and computer.

mumsoft
26-05-2008, 20:38
Thank you very much - I've missed that. Well, now all it's about OK, but a bit strange. After the routs adding, if I have my wl700 in WAN-AutomaticIP and after that start VPN(PPTP)-connection from computer - there are both local and internet access from computer, but no internet access from wl700. If I switch in WAN-PPTP - there is internet only both for wl700 and computer.

1) This question is not related to the subject. Look around for VPN or so, or post your question in another thread.
2) You have added something to the rc.local that has sections in it for different purposes. Get yourself a decent editor like joe or nano (search for it), and edit the rc.local properly.

Rgds
Marc