X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fodhcp6c.c;h=9aaa008881d28067075552256b36b3f006b6a734;hb=1aa59e83326585ec9e16c559865181baf4ef56c7;hp=2cb4bbcf10a200797e2268bae6120aeb250a2928;hpb=2694232fb6fd00351dcd51609aac08b66fb2b1d8;p=odhcp6c.git diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 2cb4bbc..9aaa008 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -164,6 +164,8 @@ int main(_unused int argc, char* const argv[]) } } + script_call("started"); + while (do_signal != SIGTERM) { // Main logic odhcp6c_clear_state(STATE_SERVER_ID); odhcp6c_clear_state(STATE_SERVER_CAND); @@ -276,6 +278,7 @@ int main(_unused int argc, char* const argv[]) dhcpv6_request(DHCPV6_MSG_RELEASE); } + script_call("stopped"); return 0; } @@ -302,7 +305,7 @@ static int usage(void) // Don't want to pull-in librt and libpthread just for a monotonic clock... -uint64_t adhc6c_get_milli_time(void) +uint64_t odhcp6c_get_milli_time(void) { struct timespec t = {0, 0}; syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &t);