X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fauth.c;h=7457eda227bf19c2d09b79dd4e0b031da6bc1bf9;hb=d98ab3805c818bfb58e20ee18e6488a851c1a90d;hp=4271af687102dc62e3c2e3b47d3fc8ab1d70d0f8;hpb=225361d64ae737afdc8cb57579a2f33525461bc9;p=ppp.git diff --git a/pppd/auth.c b/pppd/auth.c index 4271af6..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" @@ -1099,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; }