X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=pppd%2Fmain.c;h=640782ad6f35d03b02f08d583733669734943acd;hb=9042dbd296cb6a3f842d569536ecec7525506700;hp=d92fdeb2142b18af6ef2c78e2b6351103d968bea;hpb=e5b7cafa28aeba66499fa26b286192529e5fde15;p=ppp.git diff --git a/pppd/main.c b/pppd/main.c index d92fdeb..640782a 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -40,7 +40,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: main.c,v 1.126 2003/04/07 00:01:45 paulus Exp $" +#define RCSID "$Id: main.c,v 1.128 2003/06/11 23:56:26 paulus Exp $" #include #include @@ -74,7 +74,7 @@ #include "ipv6cp.h" #endif #include "upap.h" -#include "chap.h" +#include "chap-new.h" #include "eap.h" #include "ccp.h" #include "ecp.h" @@ -438,8 +438,6 @@ main(argc, argv) waiting = 0; - create_linkpidfile(getpid()); - /* * If we're doing dial-on-demand, set up the interface now. */ @@ -459,6 +457,7 @@ main(argc, argv) * Configure the interface and mark it up, etc. */ demand_conf(); + create_linkpidfile(getpid()); } do_callback = 0; @@ -515,6 +514,9 @@ main(argc, argv) status = EXIT_FATAL_ERROR; goto disconnect; } + /* create the pid file, now that we've obtained a ppp interface */ + if (!demand) + create_linkpidfile(getpid()); if (!demand && ifunit >= 0) set_ifunit(1);