home *** CD-ROM | disk | FTP | other *** search
- Here is an example of support for automatic dialling, suitable for ppp, slip
- and plip connections.
- It is included as a working example of what can be done with kerneld.
- There is yet no support for automatic re-dialling of dropped lines...
-
- For ppp, you should use a recent release of pppd, that supports the
- "idle-disconnect" parameter.
-
- Note: there is a patch below that will autoload the slip module as well..
-
- Anyway, the connection will be set up automatically whenever you try
- to make a connection with ping, ftp or whatever...
- (Check your "/etc/resolv.conf" for the "nameserver" directive.)
-
- The rest of this text concerns ppp, but it is easy to "convert" the
- instructions so that they will fit slip, if that is what you use.
-
- The kerneld utility will also be triggered automatically by pppd, via the
- kernel, to load the modules "ppp" and "slhc" if they aren't resident.
- These modules will be removed by kerneld when they have done their job...
- If your normal dialup time exceeds 60 seconds, you could try to adjust
- the timeout in the script "/sbin/request-route" as well as the "delay"
- parameter to kerneld (see the man page for kerneld).
-
- The patch to "linux/net/inet/route.c" will make a kerneld request for
- the action KERNELD_REQUEST_ROUTE if no suitable route has been found.
- This will make kerneld start the utility "/sbin/request-route" with
- the requested route as a parameter (in aaa.bbb.ccc.ddd notation).
-
- The included "request-route" will start up pppd and wait for a connection.
- When the connection is up, pppd will execute the script "/etc/ppp/ip-up".
- A suitable low-budget "/etc/ppp/ip-up" can look like this:
-
- #! /bin/sh
- LOCK=/tmp/request-route
- if [ -f $LOCK ]
- then
- to_kill=`cat $LOCK`
- kill -1 $to_kill
- fi
-
- This will make "/sbin/request-route" return before the timeout of 60 seconds.
- If no IP-activity has been seen for at least the timeout period, the patched
- pppd will terminate after "idle-diconnect" seconds.
-
-
- So, you will need to update your "/etc/ppp/ip-up" script according to
- the example above, maybe adapt /sbin/request-route so that it fits your
- needs, possibly create a chat-file "/etc/ppp/chat-1.2.3.4" (the IP address
- of your name server, to be accessed by ppp), and finally apply the patch to
- your pppd-2.1.2[bc] sources.
-
- That's it!
-
- Bjorn Ekwall <bj0rn@blox.se>
-
- ============= Kernel support for autoloading slip =============
- --- linux/drivers/char/tty_io.c.1.3.57 Tue Dec 12 06:16:36 1995
- +++ linux/drivers/char/tty_io.c Sun Jan 14 11:16:29 1996
- @@ -73,6 +73,10 @@
- #include "vt_kern.h"
- #include "selection.h"
-
- +#ifdef CONFIG_KERNELD
- +#include <linux/kerneld.h>
- +#endif
- +
- #define CONSOLE_DEV MKDEV(TTY_MAJOR,0)
- #define TTY_DEV MKDEV(TTYAUX_MAJOR,0)
-
- @@ -211,8 +215,17 @@
- int retval = 0;
- struct tty_ldisc o_ldisc;
-
- - if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS) ||
- - !(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED))
- + if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS))
- + return -EINVAL;
- +#ifdef CONFIG_KERNELD
- + /* Eduardo Blanco <ejbs@cs.cs.com.uy> */
- + if (!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED)) {
- + char modname [20];
- + sprintf(modname, "tty-ldisc-%d", ldisc);
- + request_module (modname);
- + }
- +#endif
- + if (!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED))
- return -EINVAL;
-
- if (tty->ldisc.num == ldisc)
-