home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume6
/
shadow-2.pt3
/
motd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-03
|
429b
|
30 lines
#include <stdio.h>
#include <string.h>
#include "config.h"
extern char home[];
void motd ()
{
#ifdef MOTD
FILE *fp;
register int c;
#ifdef HUSHLOGIN
char hush[BUFSIZ];
(void) strcat (strcpy (hush, home + 5), "/.hushlogin");
if (access (hush, 0) == 0)
return;
#endif
if ((fp = fopen ("/etc/motd", "r")) == (FILE *) 0)
return;
while ((c = getc (fp)) != EOF)
putchar (c);
fclose (fp);
fflush (stdout);
#endif
}