Merged from Lite2 (one bcopy -> memmove, one significant change:

don't unlink _PATH_NOLOGIN for the -k case even if shutdown terminates
abnormally.  NetBSD already has this change).
This commit is contained in:
Bruce Evans 1998-12-11 11:21:47 +00:00
parent 689419f325
commit 39b831af10
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41684

View File

@ -39,10 +39,10 @@ static const char copyright[] =
#ifndef lint #ifndef lint
#if 0 #if 0
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94"; static char sccsid[] = "@(#)shutdown.c 8.4 (Berkeley) 4/28/95";
#endif #endif
static const char rcsid[] = static const char rcsid[] =
"$Id: shutdown.c,v 1.14 1998/12/10 23:54:02 msmith Exp $"; "$Id: shutdown.c,v 1.15 1998/12/11 11:04:19 bde Exp $";
#endif /* not lint */ #endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
@ -164,7 +164,7 @@ main(argc, argv)
break; break;
if (p != mbuf) if (p != mbuf)
*p++ = ' '; *p++ = ' ';
bcopy(*argv, p, arglen); memmove(p, *argv, arglen);
p += arglen; p += arglen;
} }
*p = '\n'; *p = '\n';
@ -480,7 +480,8 @@ void
finish(signo) finish(signo)
int signo; int signo;
{ {
(void)unlink(_PATH_NOLOGIN); if (!killflg)
(void)unlink(_PATH_NOLOGIN);
exit(0); exit(0);
} }