diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-09-15 16:41:10 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-09-15 16:41:10 +0000 |
commit | 13811ba0720875279b4ae6eff25636ed7bdf38a7 (patch) | |
tree | 77d469c0d11457a34cdea3392e8414efceb7b5f3 /sbin/startslip | |
parent | 7c8e2aa48c735a871f9df6dec9a3c3e61452d90d (diff) | |
download | src-test2-13811ba0720875279b4ae6eff25636ed7bdf38a7.tar.gz src-test2-13811ba0720875279b4ae6eff25636ed7bdf38a7.zip |
Notes
Diffstat (limited to 'sbin/startslip')
-rw-r--r-- | sbin/startslip/startslip.1 | 13 | ||||
-rw-r--r-- | sbin/startslip/startslip.c | 8 |
2 files changed, 18 insertions, 3 deletions
diff --git a/sbin/startslip/startslip.1 b/sbin/startslip/startslip.1 index 2ce01616b20c..66404f9a0647 100644 --- a/sbin/startslip/startslip.1 +++ b/sbin/startslip/startslip.1 @@ -132,10 +132,21 @@ Default value is no flow control. .It Fl U Ar upscript Specifies a script to run when a SLIP interface becomes connected. This may contain ifconfig, route, and other appropriate commands. The arguments that -are passed to the script are "slX up". Default value is "/sbin/ifconfig". +are passed to the script are "slX up". +Default value is "/sbin/ifconfig". +Dial sequence number (see +.Fl s ) +passed via +.Dv LINE +environment variable. .It Fl D Ar downscript Specifies a script to run when a SLIP connection goes away. The arguments that are passed to the script are "slX down". Default value is "/sbin/ifconfig". +Dial sequence number (see +.Fl s ) +passed via +.Dv LINE +environment variable. .El .Sh FILES .Bl -tag -width /var/run/startslip-<device>.pid -compact diff --git a/sbin/startslip/startslip.c b/sbin/startslip/startslip.c index 7c72f5716249..95a773bd9957 100644 --- a/sbin/startslip/startslip.c +++ b/sbin/startslip/startslip.c @@ -227,7 +227,9 @@ main(argc, argv) } else restart: if (logged_in) { - sprintf(buf, "%s %s down &", downscript ? downscript : "/sbin/ifconfig" , unitname); + sprintf(buf, "LINE=%d %s %s down &", + diali ? (dialc - 1) % diali : 0, + downscript ? downscript : "/sbin/ifconfig" , unitname); (void) system(buf); } if (terminate) @@ -445,7 +447,9 @@ restart: (void) dup2(0, 2); } - sprintf(buf, "%s %s up &", upscript ? upscript : "/sbin/ifconfig" , unitname); + sprintf(buf, "LINE=%d %s %s up &", + diali ? (dialc - 1) % diali : 0, + upscript ? upscript : "/sbin/ifconfig" , unitname); (void) system(buf); printd(", ready\n"); |