aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-10-27 22:53:19 +0000
committerBrian Somers <brian@FreeBSD.org>1998-10-27 22:53:19 +0000
commita237dcba17d047258e1c9907b05515b606bbdefd (patch)
treed0a34de5279acc92955e1a1dab8524a6bda1d3e1 /usr.sbin/ppp
parent0460185ddf058bbb82f7b721d634e85edba44ae7 (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/command.c7
-rw-r--r--usr.sbin/ppp/ppp.84
-rw-r--r--usr.sbin/ppp/ppp.8.m44
3 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 2e432ff127f7..a45ab3c8bb5f 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.171 1998/10/26 19:07:39 brian Exp $
+ * $Id: command.c,v 1.172 1998/10/26 19:07:42 brian Exp $
*
*/
#include <sys/types.h>
@@ -134,7 +134,7 @@
#define NEG_DNS 50
const char Version[] = "2.0";
-const char VersionDate[] = "$Date: 1998/10/26 19:07:39 $";
+const char VersionDate[] = "$Date: 1998/10/26 19:07:42 $";
static int ShowCommand(struct cmdargs const *);
static int TerminalCommand(struct cmdargs const *);
@@ -384,8 +384,10 @@ static void
expand(char **nargv, int argc, char const *const *oargv, struct bundle *bundle)
{
int arg;
+ char pid[12];
nargv[0] = strdup(oargv[0]);
+ snprintf(pid, sizeof pid, "%d", getpid());
for (arg = 1; arg < argc; arg++) {
nargv[arg] = strdup(oargv[arg]);
nargv[arg] = subst(nargv[arg], "HISADDR",
@@ -402,6 +404,7 @@ expand(char **nargv, int argc, char const *const *oargv, struct bundle *bundle)
mp_Enddisc(bundle->ncp.mp.cfg.enddisc.class,
bundle->ncp.mp.cfg.enddisc.address,
bundle->ncp.mp.cfg.enddisc.len));
+ nargv[arg] = subst(nargv[arg], "PROCESSID", pid);
nargv[arg] = subst(nargv[arg], "LABEL", bundle_GetLabel(bundle));
}
nargv[arg] = NULL;
diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8
index 22aa170f3ae3..ddd3cf0cc91f 100644
--- a/usr.sbin/ppp/ppp.8
+++ b/usr.sbin/ppp/ppp.8
@@ -1,4 +1,4 @@
-.\" $Id: ppp.8,v 1.129 1998/10/26 19:07:39 brian Exp $
+.\" $Id: ppp.8,v 1.130 1998/10/27 22:53:18 brian Exp $
.Dd 20 September 1995
.Os FreeBSD
.Dt PPP 8
@@ -2381,6 +2381,8 @@ file.
This is replaced with the IP number assigned to the local interface.
.It Li PEER_ENDDISC
This is replaced with the value of the peers endpoint discriminator.
+.It Li PROCESSID
+This is replaced with the current process id.
.It Li USER
This is replaced with the username that has been authenticated with PAP or
CHAP. Normally, this variable is assigned only in -direct mode. This value
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index 22aa170f3ae3..ddd3cf0cc91f 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -1,4 +1,4 @@
-.\" $Id: ppp.8,v 1.129 1998/10/26 19:07:39 brian Exp $
+.\" $Id: ppp.8,v 1.130 1998/10/27 22:53:18 brian Exp $
.Dd 20 September 1995
.Os FreeBSD
.Dt PPP 8
@@ -2381,6 +2381,8 @@ file.
This is replaced with the IP number assigned to the local interface.
.It Li PEER_ENDDISC
This is replaced with the value of the peers endpoint discriminator.
+.It Li PROCESSID
+This is replaced with the current process id.
.It Li USER
This is replaced with the username that has been authenticated with PAP or
CHAP. Normally, this variable is assigned only in -direct mode. This value