From: Nathan Neulinger Date: Mon, 14 May 2001 22:41:12 +0000 (+0000) Subject: change-effect-of-afs-quietfs-env-20010514 X-Git-Tag: openafs-stable-1_1_0~168 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=92165dc105d8195dc90c8ce777eb060df0ea34b4;p=packages%2Fo%2Fopenafs.git change-effect-of-afs-quietfs-env-20010514 so ViceLog happens when file server starts --- 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);