Write the pid file twice, so scripts can kill client before it daemonizes.

This commit is contained in:
mellon 2003-10-24 05:27:55 +00:00
parent bc6c928df7
commit dddda170ba
1 changed files with 7 additions and 1 deletions

View File

@ -41,7 +41,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhclient.c,v 1.8 2003/02/18 17:08:39 drochner Exp $ Copyright (c) 1995-2002 Internet Software Consortium. All rights reserved.\n";
"$Id: dhclient.c,v 1.9 2003/10/24 05:27:55 mellon Exp $ Copyright (c) 1995-2002 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -263,6 +263,12 @@ int main (argc, argv, envp)
system (command);
}
/* This isn't the final pid, but it may be needed so that
* /etc/rc.d/dhclient can kill the client before it's done with
* initially configuring an interface.
*/
write_client_pid_file();
if (!quiet) {
log_info ("%s %s", message, DHCP_VERSION);
log_info (copyright);