I have created a Linux-based, CD-based router operating system for my router machine. I have done the same thing before for several internet connections, but this is the first time I have ever used a DSL-based PPPoE connection. All of the other routers I've built have been for purely Ethernet-based configuration with routing for a block of IPs, a firewall, NAT, port forwarding, and a serial-based console(s).
This one is a little simpler, since it's for my home -- only one (dynamic) IP, a firewall, some NAT with port forwarding, but no routing or serial consoles. But this is the first time I've had to get PPPoE working.
I have PPPoE working via Roaring Penguin PPPoE; the CD copies various config files to the RAMdisk at boot time, and when I log in I can run /usr/sbin/adsl-start and everything connects and works fine.
However, if I try to run /usr/sbin/adsl-start from rc.local, I get an endless loop of errors like:
expr: command not found, and
-gt: unary operator expected, etc.
I really need to run this at boot-time, and I also need to run it before I can run my firewall scripts, because obviously the firewall needs to use the ppp interface.
I have seen these errors before, but admittedly my job revolves more around the cursed world of Microsoft/.NET software development, and I have shied away from the realms of Linux systems administration for the past two years. Is this a permissions problem? The files are all CHMODed for executable; and of course the shell is too. The config files are also all readable.
This is a 2.4.2x kernel, running on a heavily modified version of the "Sentry Firewall CD" (http://www.sentryfirewall.com
). But again, I don't think any of that is as important; the whole shebang works from a login shell but not from rc.local!
Should I try like /bin/bash /usr/sbin/adsl-start? Even though adsl-start is configured to run with sh with !#/bin/sh?
As you can see I'm not even sure where to begin. Any pointers would be appreciated.
Thanks for any help