From: Samuel Thibault Date: Thu, 31 Dec 2020 04:50:46 +0000 (+0100) Subject: pppd: Export $CALL_FILE to the link scripts (#196) X-Git-Tag: ppp-2.4.9~23 X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=861202529f60b020c5a6d0c0176c4291856114cc;p=ppp.git pppd: Export $CALL_FILE to the link scripts (#196) From https://bugs.debian.org/51880 “ This would make it much easier for me, and cleaner too, to handle multiple, mutually exclusive, dialout internet service providers. ” Signed-off-by: Samuel Thibault Co-authored-by: Marco d'Itri --- diff --git a/pppd/options.c b/pppd/options.c index 108e2b8..f8d6c00 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -1451,6 +1451,7 @@ callfile(char **argv) if ((fname = (char *) malloc(l)) == NULL) novm("call file name"); slprintf(fname, l, "%s%s", _PATH_PEERFILES, arg); + script_setenv("CALL_FILE", arg, 0); ok = options_from_file(fname, 1, 1, 1); diff --git a/pppd/pppd.8 b/pppd/pppd.8 index 846b862..85af954 100644 --- a/pppd/pppd.8 +++ b/pppd/pppd.8 @@ -1760,6 +1760,9 @@ the connection. .B LINKNAME The logical name of the link, set with the \fIlinkname\fR option. .TP +.B CALL_FILE +The value of the \fIcall\fR option. +.TP .B DNS1 If the peer supplies DNS server addresses, this variable is set to the first DNS server address supplied (whether or not the usepeerdns