X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmain.c;h=d5c4d131313800da92072ed688079cf9a0ea9fd3;hb=010e00bc54262e0ce57746068e916fc4a08b8f33;hp=46863829fdb4bb2a2b874e41ba72e1eecc0d1465;hpb=8e950ea70924467a81ecb8411d5fc5932ccc2f23;p=ppp.git diff --git a/pppd/main.c b/pppd/main.c index 4686382..d5c4d13 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.97 2000/04/24 02:54:16 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; @@ -1014,8 +1022,8 @@ void set_ifunit(iskey) int iskey; { - info("Using interface ppp%d", ifunit); - slprintf(ifname, sizeof(ifname), "ppp%d", ifunit); + info("Using interface %s%d", PPP_DRV_NAME, ifunit); + slprintf(ifname, sizeof(ifname), PPP_DRV_NAME "%d", ifunit); script_setenv("IFNAME", ifname, iskey); if (iskey) { create_pidfile(); /* write pid to file */