]> mj.ucw.cz Git - nwho.git/commitdiff
Split ywho and nwho.
authorMartin Mares <mj@ucw.cz>
Fri, 22 Mar 2002 20:20:16 +0000 (20:20 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 22 Mar 2002 20:20:16 +0000 (20:20 +0000)
ChangeLog
Makefile
README
debian/changelog
debian/control
debian/copyright
debian/rules
net.h
nwhod.c

index 50351b524c3f93c8cee9051cb1b69e6138675dfc..8d272a6dca205e488bc65cc0f986b6587832f7b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-22  Martin Mares  <mj@ucw.cz>
+
+       * Split ywho and nwho.
+
+       * net.h: State is now kept in /var/state/nwho.
+
 2001-02-06  Martin Mares  <mj@atrey.karlin.mff.cuni.cz>
 
        * Released as version 1.9.
index 4b3255e0dc1d31ced12ae8f0cc829900257d319e..a013f805b5416ec97c76a74d33bc360bfd6f9e01 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,11 @@
-# Makefile for the ywho toolkit
+# Makefile for the nwho toolkit
 
 CFLAGS=-O2 -Wall -Wno-parentheses
 LDFLAGS=-s
 ROOT=/
-REL=ywho-1.9
+REL=nwho-1.9
 
-all: ywho nwhod nwho
-
-ywho: ywho.o
-
-ywho.o: ywho.c
+all: nwhod nwho
 
 nwhod: nwhod.o
 
@@ -20,13 +16,12 @@ nwho: nwho.o
 nwho.o: nwho.c net.h
 
 clean:
-       rm -f *.o ywho nwhod nwho *~
+       rm -f *.o nwhod nwho *~
        rm -rf dist
 
 install:
-       strip ywho
        mkdir -p $(ROOT)/usr/bin $(ROOT)/usr/sbin
-       install -s -m 755 ywho nwho $(ROOT)/usr/bin
+       install -s -m 755 nwho $(ROOT)/usr/bin
        ln -sf nwho $(ROOT)/usr/bin/nuptime
        install -s -m 755 nwhod $(ROOT)/usr/sbin
        install -d -m 755 $(ROOT)/var/spool/nwho
diff --git a/README b/README
index 8377457edcfec52aa0d34d6d5fccd048774ce664..50dc89e3524fba257782c16e90f2fb87b4ab0e55 100644 (file)
--- a/README
+++ b/README
@@ -1,42 +1,9 @@
-This package contains the Yet Another Who-like Utility, version 1.8.
+This package contains the Yet Another Network Who-like Utility, version 1.9.
 
-Copyright (c) 1996--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+Copyright (c) 1996--2001 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
 
 All files in this package can be freely distributed and used according
 to the terms of the GNU General Public License, either version 2 or
 (at your opinion) any newer version. This is the same distribution
 policy as for the Linux kernel itself -- see /usr/src/linux/COPYING
 for details.
-
-
-Yes, this is yet another who-like utility displaying all
-information about logged in users and compressed system status
-to see everything in just a single jiffie.
-
-This archive also contains a simple rwho/rwhod replacement,
-but it's probably worth rewriting from scratch anyway.
-
-If you have any bug reports or suggestions, send them to the author.
-
-
-No real documentation exists yet, but let's take a explanatory look
-on ywho output:
-
-                                               day of week (0=mon,6=sun)
-                                                         |
-kernel version    CPU     system uptime  runtime  date    |  time
-   |               |           |          |        |      |    |        
-Linux 2.0.35 on AMD K6-2, up 69d08, run  6d00 at 28-03-99/6 23.57:10
-
-tasks: running/total   load       memory info     number of logged-in users
-   |                   |               |                        |
-R/T=2/86, LAV=0.30/0.12/0.06, free 67M of RAM, used 3M of swap, 8 users.
-
-  messages---++-------daemons running on behalf of that user
-             ||
-user   line  ||  logged in from   how long    run time of user's tasks
-  |      |   ||     |               |           |
-Name     Li  MD From              LogT  IdleT RunT  Command
-mj       p0  -D albireo.ucw.cz    04.01   |      4s ywho
-                                          |
-                                        idle time
index 0ad27b197af4ffdc6d07cfa9846baa1226d2e23b..257223a22e59e0b278acd2d1aa00ef5f8764e56f 100644 (file)
@@ -1,3 +1,9 @@
+ywho (1.9-4) unstable; urgency=low
+
+  * Split ywho and nwho.
+
+ -- Martin Mares <mj@kam.mff.cuni.cz>  Fri, 22 Mar 2002 21:18:30 +0100
+
 ywho (1.9-3) unstable; urgency=low
 
   * Minor bugfix of console formatting.
index 729541dc3f5c354c78f5897a067b5b5ee57da2d0..e8582629c6f2bd64f894fcef744f7ef60c3c7b90 100644 (file)
@@ -1,10 +1,10 @@
-Source: ywho
+Source: nwho
 Section: ucw
 Priority: optional
 Maintainer: Martin Mares <mj@ucw.cz>
 Standards-Version: 2.1.0.0
 
-Package: ywho
+Package: nwho
 Architecture: any
 Depends: ${shlibs:Depends}
 Description: Extended who
index dd04f64d39c76ff32ac1dd930d2de0d654d5c441..4e28a037ebaab142fa8bfa26a40e392b0fab0a00 100644 (file)
@@ -1,5 +1,5 @@
-YWho -- who/rwho/rwhod replacement
-Copyright (c) 1996--1999 Martin Mares <mj@ucw.cz>
+NWho -- rwho/rwhod replacement
+Copyright (c) 1996--2001 Martin Mares <mj@ucw.cz>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 7d14701e957aa38eb378e26d02a1346db081f48b..52670648fc9dc27727365c566bb59ed3e7a7af2c 100755 (executable)
@@ -24,7 +24,7 @@ binary-arch: build
        dh_testdir
        dh_testroot
        dh_clean -k
-       dh_installdirs etc sbin
+       dh_installdirs etc sbin var/state/nwho
 
        $(MAKE) ROOT=`pwd`/debian/tmp install
 
@@ -34,7 +34,7 @@ binary-arch: build
 #      dh_installinit
 #      dh_installcron
 #      dh_installmanpages
-       dh_undocumented nwho.1 nwhod.8 ywho.1
+       dh_undocumented nwho.1 nwhod.8
        dh_installchangelogs
        dh_strip
 #      dh_compress
diff --git a/net.h b/net.h
index de3a11f67055d4535ff644c5286c1bee357f5c4a..54a095957f2ccd0d4b2e57c05ab89182194b489a 100644 (file)
--- a/net.h
+++ b/net.h
@@ -28,7 +28,7 @@ struct rywho_pkt {
   struct userinfo users[MAX_USERS];
 };
 
-#define NWHO_SPOOL_DIR "/var/spool/nwho"
+#define NWHO_SPOOL_DIR "/var/state/nwho"
 #define NWHO_MAGIC 0x21913332
 
 #define DEFAULT_SEND_TIME 30
diff --git a/nwhod.c b/nwhod.c
index 812759f6b25e150de74f5e767c8ba4830c6a346a..23accf6d3b61a78754708351ebd37363f8a04563 100644 (file)
--- a/nwhod.c
+++ b/nwhod.c
@@ -19,6 +19,7 @@
 #include <arpa/inet.h>
 #include <syslog.h>
 #include <sys/stat.h>
+#include <time.h>
 #include <utmp.h>
 #include <signal.h>
 #include <dirent.h>