From 861202529f60b020c5a6d0c0176c4291856114cc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 31 Dec 2020 05:50:46 +0100 Subject: [PATCH] pppd: Export $CALL_FILE to the link scripts (#196) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- pppd/options.c | 1 + pppd/pppd.8 | 3 +++ 2 files changed, 4 insertions(+) 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 -- 2.39.2