Pass sequence number to called scripts via LINE env. variable.
It allows specific per phone number tunings
This commit is contained in:
parent
7c8e2aa48c
commit
13811ba072
@ -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
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user