From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,b05ec13ba61d474f,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1994-04-07 11:14:47 PST Newsgroups: comp.os.linux.announce Path: gmd.de!xlink.net!zib-berlin.de!news.th-darmstadt.de!terra.wiwi.uni-frankfurt.de!zeus.rbi.informatik.uni-frankfurt.de!news.dfn.de!scsing.switch.ch!swidir.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!batcomputer!cornell!bounce-bounce From: lilo@slip-1-82.ots.utexas.edu (lilo) Subject: More confusion/Another DIP :) Message-ID: Followup-To: comp.os.linux.misc Keywords: DIP, SLIP, TCP/IP, serial, dialup Sender: mdw@cs.cornell.edu (Matt Welsh) Reply-To: lilo@slip-1-82.ots.utexas.edu (lilo) Organization: The University of Texas at Austin, Austin, Texas Date: Thu, 7 Apr 1994 18:14:47 GMT Gee, I hope this works. Enclosed is the change file explaining my version of DIP; it's followed by the .lsm file for the same. I'm submitting this version, even though some of its features might be done a bit better by the Strauss version, because it includes some additional features which I hope others will find helpful. Here goes.... :) --lilo dip-3.3.7-lilo-3.2 18 March 1994 Here it is, my modified dip 3.3.7. Some of the features: (1) I kept the \s character; it's very handy for testing for blanks at the *end* of strings. (2) Run this dip under root. A dividend is that, if the host you dial to hangs up on you, it will terminate the program with an informative exit code (see #4 below). (3) If you specify the -b flag, it will toggle off "background" mode and the program will run in the foreground. Yes, I know this is backwards behavior but it's for compatibility with everyone else's dip, which always runs in background. ;) (4) Running in "foreground mode", I produce a whole variety of exit codes which tell you why the program terminated. This can be very useful for designing a daemon in shell script form. (5) I've added the "-c count" flag, which causes dip to terminate with a special exit code (5) if "count" seconds elapse before the dial script puts dip into protocol mode. So, you can write a simple dial script and do more complex things in your calling shell script, which I think is handy. CAVEAT: the "number of seconds" on the dial script "wait" command is disabled when you specify a non-zero "-c" value. (6) I have added a "-s /setup" parameter, where "/setup" is the name of a shell script (it must start with "/") which completes protocol initialization. This shell script gets passed all sorts of internal variables, and it must issue the "ifconfig" and "route" commands (as well as doing anything else you'd like it to). You can insert a "#!/bin/bash" or whatever at the beginning of the script to use the shell of your choice. (7) The '-n' flag causes the tty to be opened non-blocking. Don't use "wait" with this, it won't work properly. This could be fixed; if you don't understand how, email me for details. :) I find this mode handy for my SLIP connection to my laptop across a hardwired serial port. (8) I added '-f path' which allows you to create separate pid files so that you can kill one of several dips you have running at a given time. It sends the dip a SIGTERM to distinguish it from a hangup, which usually indicates that your remote SLIP server gave you the heave-ho. To use it, start up your dip, for example, with the parameter '-f fred'. This creates a file '/etc/fred.pid' with the process ID in it. To kill the dip process, use 'dip -f fred -k'. (9) I've provided sample daemon shell scripts, setup shell scripts and a second sample dial script that is what I use here to hook up to my dynamic slip server. The setup script for that connection (also provided) actually rewrites a bunch of /etc files everytime it gets a connection. It recovers from a hangup by redialing after a random period of time (5-40 minutes, I think it is). If it doesn't connect, it waits a minute or so and tries again until it does connect. It writes informative messages into a log in /var/adm so you can tell what is going on, as does the setup shell script. (10) I put a lot of new documentation into the man page, dip.8. I left most of the old stuff there--so if something's not right, tell me and I'll be glad to fix it. :) But it should give you enough detail to play with all the new features. Anyway, there you have it. Enjoy! Let me know what you think. I'll keep maintaining this version until someone merges enough of it into another version.... :) -- lilo Maintainer = lilo MaintEmail = lilo Site1 = sunsite.unc.edu Path1 = pub/Linux/Incoming File1 = dip-3.3.7-lilo-3.2.Tar.gz FileSize1 = 67K Site2 = tsx-11.mit.edu Path2 = incoming File2 = dip-3.3.7-lilo-3.2.Tar.gz FileSize2 = 67K Required1 = gcc 2.5.8 CopyPolicy1 = GNU Public License, version 2 or later (at your option) Keywords = dip setup script timeout foreground Comment1 = There's been some discussion of merging the various dip Comment2 = versions together. I like it. :) RelFiles1 = dip-3.3.7-lilo-3.2.lsm Entered = 06APR94 EnteredBy = lilo CheckedEmail = lilo End -- Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu Be sure to include Keywords: and a short description of your software.