X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=7457eda227bf19c2d09b79dd4e0b031da6bc1bf9;hp=2f81283aceb9d4df9f302ae19e1815c5c36b7bf9;hb=5c765a67fd25f9d84e71ed61ace37c8c97f6be15;hpb=398ed2585640d198c53e736ee5bbd67f7ce8168e diff --git a/pppd/auth.c b/pppd/auth.c index 2f81283..7457eda 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -100,6 +100,10 @@ #endif #include +#ifdef SYSTEMD +#include +#endif + #include "pppd.h" #include "fsm.h" #include "lcp.h" @@ -553,6 +557,7 @@ link_required(unit) void start_link(unit) int unit; { + status = EXIT_CONNECT_FAILED; new_phase(PHASE_SERIALCONN); hungup = 0; @@ -1098,8 +1103,15 @@ np_up(unit, proto) /* * Detach now, if the updetach option was given. */ - if (updetach && !nodetach) + if (updetach && !nodetach) { + dbglog("updetach is set. Now detaching."); detach(); +#ifdef SYSTEMD + } else if (nodetach && up_sdnotify) { + dbglog("up_sdnotify is set. Now notifying systemd: READY=1"); + sd_notify(0, "READY=1"); +#endif + } } ++num_np_up; }