Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ypbind Log state transitions.
details: https://anonhg.NetBSD.org/src/rev/4f63b250a2d1
branches: trunk
changeset: 329815:4f63b250a2d1
user: dholland <dholland%NetBSD.org@localhost>
date: Tue Jun 10 17:19:48 2014 +0000
description:
Log state transitions.
diffstat:
usr.sbin/ypbind/ypbind.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (51 lines):
diff -r 06b4cdc7fa53 -r 4f63b250a2d1 usr.sbin/ypbind/ypbind.c
--- a/usr.sbin/ypbind/ypbind.c Tue Jun 10 17:19:36 2014 +0000
+++ b/usr.sbin/ypbind/ypbind.c Tue Jun 10 17:19:48 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ypbind.c,v 1.97 2014/06/10 17:19:36 dholland Exp $ */
+/* $NetBSD: ypbind.c,v 1.98 2014/06/10 17:19:48 dholland Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt%fsa.ca@localhost>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef LINT
-__RCSID("$NetBSD: ypbind.c,v 1.97 2014/06/10 17:19:36 dholland Exp $");
+__RCSID("$NetBSD: ypbind.c,v 1.98 2014/06/10 17:19:48 dholland Exp $");
#endif
#include <sys/types.h>
@@ -628,6 +628,12 @@
dom->dom_losttime = 0;
dom->dom_backofftime = 10;
+ if (is_ypset == 0) {
+ yp_log(LOG_NOTICE, "Domain %s is alive; server %s",
+ dom->dom_name,
+ inet_ntoa(dom->dom_server_addr.sin_addr));
+ }
+
/*
* Generate a new binding file. If this fails, forget about it.
* (But we keep the binding and we'll report it to anyone who
@@ -1514,6 +1520,9 @@
dom->dom_state = DOM_LOST;
dom->dom_losttime = t;
dom->dom_checktime = t + 5;
+ yp_log(LOG_NOTICE, "Domain %s lost its binding to "
+ "server %s", dom->dom_name,
+ inet_ntoa(dom->dom_server_addr.sin_addr));
(void)nag_servers(dom);
break;
@@ -1521,6 +1530,9 @@
if (t > dom->dom_losttime + 60) {
dom->dom_state = DOM_DEAD;
dom->dom_backofftime = 10;
+ yp_log(LOG_NOTICE, "Domain %s dead; "
+ "going to exponential backoff",
+ dom->dom_name);
}
dom->dom_checktime = t + 5;
(void)nag_servers(dom);
Home |
Main Index |
Thread Index |
Old Index