diff options
author | bde <bde@FreeBSD.org> | 1998-12-11 11:21:47 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-12-11 11:21:47 +0000 |
commit | 518ccde50a1c38c1d5d481cb62200ca92dbdeff0 (patch) | |
tree | 9dd1e25b07a7ff4f8354c86e0b27ffa3f05118ec | |
parent | 1d4f8cd23a3e4aab7c57b3ac1aa197979cd0d56b (diff) | |
download | FreeBSD-src-518ccde50a1c38c1d5d481cb62200ca92dbdeff0.zip FreeBSD-src-518ccde50a1c38c1d5d481cb62200ca92dbdeff0.tar.gz |
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).
-rw-r--r-- | sbin/shutdown/shutdown.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 6c7d51e..680925f 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -39,10 +39,10 @@ static const char copyright[] = #ifndef lint #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 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 */ #include <sys/param.h> @@ -164,7 +164,7 @@ main(argc, argv) break; if (p != mbuf) *p++ = ' '; - bcopy(*argv, p, arglen); + memmove(p, *argv, arglen); p += arglen; } *p = '\n'; @@ -480,7 +480,8 @@ void finish(signo) int signo; { - (void)unlink(_PATH_NOLOGIN); + if (!killflg) + (void)unlink(_PATH_NOLOGIN); exit(0); } |