-
- signal(SIGALRM, do_nothing);
-}
-
-/*
- * make an entry in the shutdown log
- */
-
-char *days[] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-char *months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
- "Oct", "Nov", "Dec"
-};
-
-log_entry(now)
-time_t now;
-{
- register FILE *fp;
- register char **mess;
- struct tm *tm, *localtime();
-
- tm = localtime(&now);
- fp = fopen(LOGFILE, "a");
- if (fp==0)
- return;
- fseek(fp, 0L, 2);
- fprintf(fp, "%02d:%02d %s %s %2d, %4d. Shutdown:", tm->tm_hour,
- tm->tm_min, days[tm->tm_wday], months[tm->tm_mon],
- tm->tm_mday, tm->tm_year + 1900);
- for (mess = nolog2; *mess; mess++)
- fprintf(fp, " %s", *mess);
- fputc('\n', fp);
- fclose(fp);