Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/reboot Support wtmpx.



details:   https://anonhg.NetBSD.org/src/rev/cae366c9eab9
branches:  trunk
changeset: 534759:cae366c9eab9
user:      wiz <wiz%NetBSD.org@localhost>
date:      Fri Aug 02 15:05:57 2002 +0000

description:
Support wtmpx.

diffstat:

 sbin/reboot/Makefile |  3 ++-
 sbin/reboot/reboot.c |  9 +++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 933427d04f17 -r cae366c9eab9 sbin/reboot/Makefile
--- a/sbin/reboot/Makefile      Fri Aug 02 14:59:40 2002 +0000
+++ b/sbin/reboot/Makefile      Fri Aug 02 15:05:57 2002 +0000
@@ -1,9 +1,10 @@
-#      $NetBSD: Makefile,v 1.17 2000/04/25 14:03:26 hubertf Exp $
+#      $NetBSD: Makefile,v 1.18 2002/08/02 15:05:57 wiz Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/5/93
 
 PROG=  reboot
 DPADD= ${LIBUTIL}
 LDADD= -lutil
+CPPFLAGS+=     -DSUPPORT_UTMP -DSUPPORT_UTMPX
 MAN=   reboot.8
 MLINKS=        reboot.8 halt.8 \
        reboot.8 poweroff.8
diff -r 933427d04f17 -r cae366c9eab9 sbin/reboot/reboot.c
--- a/sbin/reboot/reboot.c      Fri Aug 02 14:59:40 2002 +0000
+++ b/sbin/reboot/reboot.c      Fri Aug 02 15:05:57 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: reboot.c,v 1.30 2002/08/02 14:59:40 wiz Exp $  */
+/*     $NetBSD: reboot.c,v 1.31 2002/08/02 15:05:58 wiz Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "@(#)reboot.c   8.1 (Berkeley) 6/5/93";
 #else
-__RCSID("$NetBSD: reboot.c,v 1.30 2002/08/02 14:59:40 wiz Exp $");
+__RCSID("$NetBSD: reboot.c,v 1.31 2002/08/02 15:05:58 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -157,7 +157,12 @@
                                syslog(LOG_CRIT, "rebooted by %s", user);
                }
        }
+#ifdef SUPPORT_UTMP
        logwtmp("~", "shutdown", "");
+#endif
+#ifdef SUPPORT_UTMPX
+       logwtmpx("~", "shutdown", "", INIT_PROCESS, 0);
+#endif
 
        /*
         * Do a sync early on, so disks start transfers while we're off



Home | Main Index | Thread Index | Old Index