]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Export $CALL_FILE to the link scripts (#196)
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 31 Dec 2020 04:50:46 +0000 (05:50 +0100)
committerGitHub <noreply@github.com>
Thu, 31 Dec 2020 04:50:46 +0000 (15:50 +1100)
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 <samuel.thibault@ens-lyon.org>
Co-authored-by: Marco d'Itri <md@linux.it>
pppd/options.c
pppd/pppd.8

index 108e2b8c1197968f770bb3bb40bc560f9a53c19a..f8d6c001e195d5b64d671b535f58e2f9be7d3cb5 100644 (file)
@@ -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);
     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);
 
 
     ok = options_from_file(fname, 1, 1, 1);
 
index 846b862fcd7fd619e124a523cdfd962b47027945..85af954bf25baca2e9cc4f91953beb2a46af1787 100644 (file)
@@ -1760,6 +1760,9 @@ the connection.
 .B LINKNAME
 The logical name of the link, set with the \fIlinkname\fR option.
 .TP
 .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
 .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