SCCS-vsn: sbin/shutdown/shutdown.c 4.10
-static char *sccsid = "@(#)shutdown.c 4.9 (Berkeley) 81/06/11";
+static char *sccsid = "@(#)shutdown.c 4.10 (Berkeley) 81/06/12";
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
* Peter Lamb, Melbourne, 1980
* William Joy, Berkeley, 1981
* Michael Toy, Berkeley, 1981
* Peter Lamb, Melbourne, 1980
* William Joy, Berkeley, 1981
* Michael Toy, Berkeley, 1981
+ * Dave Presotto, Berkeley, 1981
*/
#ifdef DEBUG
#define LOGFILE "shutdown.log"
*/
#ifdef DEBUG
#define LOGFILE "shutdown.log"
#define SECONDS
#define NLOG 20 /* no of args possible for message */
#define NOLOGTIME 5 MINUTES
#define SECONDS
#define NLOG 20 /* no of args possible for message */
#define NOLOGTIME 5 MINUTES
+#define IGNOREUSER "sleeper"
int do_nothing();
time_t getsdt();
int do_nothing();
time_t getsdt();
ufd = open("/etc/utmp",0);
nowtime = time((long *) 0);
while (read(ufd,&utmp,sizeof utmp)==sizeof utmp)
ufd = open("/etc/utmp",0);
nowtime = time((long *) 0);
while (read(ufd,&utmp,sizeof utmp)==sizeof utmp)
+ if (utmp.ut_name[0] &&
+ strncmp(utmp.ut_name, IGNOREUSER, sizeof(utmp.ut_name))) {
strcpy(term, tpath);
strncat(term, utmp.ut_line, sizeof utmp.ut_line);
alarm(3);
strcpy(term, tpath);
strncat(term, utmp.ut_line, sizeof utmp.ut_line);
alarm(3);