From 04cb4ed3a6cfb676cac7c8ea35f0f4ccc43b7121 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 31 Dec 2010 17:43:03 +0100 Subject: [PATCH] More work on bringing the Debian packaging up to date Revived default file and init script which got lost in the process of repository conversions somehow. --- debian/copyright | 8 +++----- debian/nwho.default | 5 +++++ debian/nwho.init | 40 ++++++++++++++++++++++++++++++++++++++++ debian/rules | 4 +++- 4 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 debian/nwho.default create mode 100755 debian/nwho.init diff --git a/debian/copyright b/debian/copyright index 4e28a03..bea915f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ NWho -- rwho/rwhod replacement -Copyright (c) 1996--2001 Martin Mares +Copyright (c) 1996--2010 Martin Mares 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 @@ -11,7 +11,5 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program in the file /usr/doc/copyright/GPL. If not, -write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, -MA 02139, USA. +A full copy of the GNU GPL can be found in /usr/share/common-licenses on +Debian systems. diff --git a/debian/nwho.default b/debian/nwho.default new file mode 100644 index 0000000..119966a --- /dev/null +++ b/debian/nwho.default @@ -0,0 +1,5 @@ +# If you want to send your nwho information to another server, set +# its name here. If you want to gather information from the others, +# leave it commented out. + +#NWHOSERVER=server.name diff --git a/debian/nwho.init b/debian/nwho.init new file mode 100755 index 0000000..6c3e951 --- /dev/null +++ b/debian/nwho.init @@ -0,0 +1,40 @@ +#!/bin/sh +# Start/stop the nwho daemon. + +### BEGIN INIT INFO +# Provides: nwho +# Required-Start: $network $local_fs +# Required-Stop: $network $local_fs +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: The network who daemon +# Description: This is Yet Another RWho Replacement utility. It collects information +# about all logged in users on a central server where it can be displayed. +### END INIT INFO + +test -f /usr/sbin/nwhod || exit 0 + +if [ -f /etc/default/nwho ] ; then + . /etc/default/nwho +fi + +case "$1" in +start) echo -n "Starting network who daemon: nwhod" + start-stop-daemon --start --quiet --exec /usr/sbin/nwhod $NWHOSERVER + echo "." + ;; +stop) echo -n "Stopping network who daemon: nwhod" + start-stop-daemon --stop --quiet --exec /usr/sbin/nwhod + [ -z "$NWHOSERVER" ] && rm -f /var/state/nwho/* + echo "." + ;; +restart|reload|force-reload) echo -n "Restarting network who daemon: nwhod" + start-stop-daemon --stop --quiet --exec /usr/sbin/nwhod + start-stop-daemon --start --quiet --exec /usr/sbin/nwhod $NWHOSERVER + echo "." + ;; +*) echo "Usage: /etc/init.d/nwho start|stop|restart|reload|force-reload" + exit 1 + ;; +esac +exit 0 diff --git a/debian/rules b/debian/rules index 55c441e..bdc7361 100755 --- a/debian/rules +++ b/debian/rules @@ -29,8 +29,10 @@ binary-arch: build $(MAKE) ROOT=`pwd`/debian/nwho install dh_installchangelogs + dh_installdocs README + dh_installinit dh_strip -# dh_compress + dh_compress dh_fixperms dh_installdeb dh_shlibdeps -- 2.39.2