Fix -1 (onetry) fails, exit(2) rather than exit(1) so an error from this

option is distingishable from other errors.
This commit is contained in:
David E. O'Brien 1999-06-25 22:28:34 +00:00
parent ad0caac41f
commit 5b4742f188
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48222

View File

@ -295,8 +295,8 @@ static void usage (appname)
note (url);
note ("");
warn ("Usage: %s [-c] [-p <port>] [-lf lease-file]", appname);
error (" [-pf pidfile] [-1] [interface]");
warn ("Usage: %s [-D] [-d] [-p <port>] [-lf lease-file]", appname);
error (" [-pf pidfile] [-q] [-1] [interface]");
}
void cleanup ()
@ -1181,7 +1181,7 @@ void state_panic (ipp)
tell the shell script that we failed to allocate an address,
and try again later. */
if (onetry) {
exit(1);
exit(2);
note ("Unable to obtain a lease on first try - exiting.\n");
}
note ("No working leases in persistent database - sleeping.\n");