From cb01d0c72ce0b5f9fdaa3c8e76df7f9af952b788 Mon Sep 17 00:00:00 2001 From: Adi Masputra Date: Fri, 21 Apr 2000 01:27:17 +0000 Subject: [PATCH] Allows another name other than "ppp" be used as the PPP interface name. If it's not defined, then use the legacy "ppp" without any changes. --- pppd/main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pppd/main.c b/pppd/main.c index 4686382..5e047d5 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -17,7 +17,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: main.c,v 1.95 2000/04/15 10:10:24 paulus Exp $" +#define RCSID "$Id: main.c,v 1.96 2000/04/21 01:27:17 masputra Exp $" #include #include @@ -226,6 +226,14 @@ struct protent *protocols[] = { NULL }; +/* + * If PPP_DRV_NAME is not defined, use the legacy "ppp" as the + * device name. + */ +#if !defined(PPP_DRV_NAME) +#define PPP_DRV_NAME "ppp" +#endif /* !defined(PPP_DRV_NAME) */ + int main(argc, argv) int argc; @@ -1015,7 +1023,7 @@ set_ifunit(iskey) int iskey; { info("Using interface ppp%d", ifunit); - slprintf(ifname, sizeof(ifname), "ppp%d", ifunit); + slprintf(ifname, sizeof(ifname), PPP_DRV_NAME "%d", ifunit); script_setenv("IFNAME", ifname, iskey); if (iskey) { create_pidfile(); /* write pid to file */ -- 2.39.2