--- main.c.orig Sat May 7 03:52:29 2005 +++ /usr/src/libexec/getty/main.c Sat May 7 12:48:11 2005 @@ -184,7 +184,7 @@ main(int argc, char *argv[]) { extern char **environ; - int first_sleep = 1, first_time = 1; + int first_sleep = 1; struct rlimit limit; int rval; @@ -312,24 +312,22 @@ putpad(CL); edithost(HE); - /* if this is the first time through this, and an - issue file has been given, then send it */ - if (first_time && IF) { - int fd; + if (!(PL && PP)) { + int fd = -1; - if ((fd = open(IF, O_RDONLY)) != -1) { - char * cp; - - while ((cp = getline(fd)) != NULL) { - putf(cp); + if (IF) { + if ((fd = open(IF, O_RDONLY)) != -1) { + char * cp; + + while ((cp = getline(fd)) != NULL) + putf(cp); + close(fd); } - close(fd); } + if (fd == -1 && IM && *IM) + putf(IM); } - first_time = 0; - if (IM && *IM && !(PL && PP)) - putf(IM); if (setjmp(timeout)) { cfsetispeed(&tmode, B0); cfsetospeed(&tmode, B0);