X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmain.c;h=652240cc6868bf13b4404be886beff2231263cd0;hb=cba27361cae7239e582aac789936607ae6760187;hp=1b3f1e54bdd3250cb41fb986b89b3aaff355128e;hpb=b6b4d28e0c38320ca6753af40845df991118cd11;p=ppp.git diff --git a/pppd/main.c b/pppd/main.c index 1b3f1e5..652240c 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -737,12 +737,16 @@ void set_ifunit(iskey) int iskey; { + char ifkey[32]; + if (req_ifname[0] != '\0') slprintf(ifname, sizeof(ifname), "%s", req_ifname); else slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit); info("Using interface %s", ifname); script_setenv("IFNAME", ifname, iskey); + slprintf(ifkey, sizeof(ifkey), "%d", ifunit); + script_setenv("UNIT", ifkey, iskey); if (iskey) { create_pidfile(getpid()); /* write pid to file */ create_linkpidfile(getpid());