From 92165dc105d8195dc90c8ce777eb060df0ea34b4 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Mon, 14 May 2001 22:41:12 +0000 Subject: [PATCH] change-effect-of-afs-quietfs-env-20010514 so ViceLog happens when file server starts --- src/viced/viced.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/viced/viced.c b/src/viced/viced.c index 06bfa9f2c..d6da4ba77 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -646,15 +646,17 @@ static FiveMinuteCheckLWP() ViceLog(2, ("Set disk usage statistics\n")); VSetDiskUsage(); if (FS_registered == 1) Do_VLRegisterRPC(); -#ifndef AFS_QUIETFS_ENV if(printBanner && (++msg&1)) { /* Every 10 minutes */ time_t now = FT_ApproxTime(); if (console != NULL) { +#ifndef AFS_QUIETFS_ENV fprintf(console,"File server is running at %s\r", afs_ctime(&now, tbuffer, sizeof(tbuffer))); +#endif /* AFS_QUIETFS_ENV */ + ViceLog(2, ("File server is running at %s\n", + afs_ctime(&now, tbuffer, sizeof(tbuffer)))); } } -#endif /* AFS_QUIETFS_ENV */ } } /*FiveMinuteCheckLWP*/ @@ -857,17 +859,24 @@ int dopanic; rx_PrintStats(debugFile); fflush(debugFile); } -#ifndef AFS_QUIETFS_ENV if (console != NULL) { now = time(0); - if (dopanic) + if (dopanic) { +#ifndef AFS_QUIETFS_ENV fprintf(console, "File server has terminated abnormally at %s\r", afs_ctime(&now, tbuffer, sizeof(tbuffer))); - else +#endif + ViceLog(0, ("File server has terminated abnormally at %s\n", + afs_ctime(&now, tbuffer, sizeof(tbuffer)))); + } else { +#ifndef AFS_QUIETFS_ENV fprintf(console, "File server has terminated normally at %s\r", afs_ctime(&now, tbuffer, sizeof(tbuffer))); - } #endif + ViceLog(0, ("File server has terminated normally at %s\n", + afs_ctime(&now, tbuffer, sizeof(tbuffer)))); + } + } exit(0); -- 2.39.5