Messages in this thread | | | From | "Alan Curry" <> | Subject | Re: serial callout devices | Date | Tue, 1 Jun 1999 02:06:35 -0500 (EST) |
| |
Albert D. Cahalan writes the following: > >Alan Curry writes: >> >> ( >> stty 38400 >> >> chat -f /usr/lib/ppp/chatscript >> case $? in >> 0) echo "Success" 1>&2 >> /usr/sbin/pppd & ;; >> 4) echo "BUSY" 1>&2 ;; >> *) echo "call failed" 1>&2 ;; >> esac > > >Arrrrgh!!! (sorry for this off-topic rant) > >This is just nuts. I don't know where people are getting these ideas.
Well, what you see above originated as ppp-on, distributed with pppd. I have modified it a bit...
>Try the PPP documentation. (not just the above people -- many have >posted similar strange hacks) You start PPP like this: > >pppd call foo (foo is a config file in /etc/ppp/peers/)
Uh-huh. And does it actually print to stderr a useful diagnostic message such as my "echo BUSY 1>&2" above? If not, it's not exactly a replacement for my script now is it?
>That's it. Nothing more. No stty needed. No ifconfig needed. >No shell script needed. You can alias the above to "ppp".
Shell scripts should not be forbidden, especially in places where they have worked just fine for years.
>ABORT "BUSY" >ABORT "ERROR" >ABORT "NO ANSWER" >ABORT "NO CARRIER" >ABORT "NO DIAL TONE" >ABORT "NO DIALTONE" >ABORT "RING" >ABORT "VOICE" >ABORT "ailed" >ABORT "ncorrect" >ABORT "nvalid" >ABORT "Error in authentication"
That's a nice collection of possible reasons the chat script may abort. I might just use this part of your suggestion. But will your method actually convey these error messages to the person who ran the script or will you expect them to have the permission (not to mention the desire) to troll through /var/log/messages?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |