slay stable port information

Package: slay
Version: 1.2
Revision: 1
Source: http://ftp.debian.org/debian/dists/potato/main/source/admin/%n_%v.orig.tar.gz
SourceDirectory: %n-%v.orig
Source-MD5: af42fd23a25a3110912bb739ff79ab7d
BuildDepends: fink (>= 0.24.12)
PatchFile: %n.patch
PatchFile-MD5: 9af02f422e157b3466cf77594a074752
PatchScript: sed 's:@FINK_IPREFIX@:%p:g' <%{PatchFile} | patch -p1
DocFiles: changelog changelog.debian copyright
ConfFiles: %p/etc/slay_mode
CompileScript: echo "Nothing to compile"
InstallScript: <<
mkdir -p %i/bin
cp slay %i/bin
mkdir -p %i/etc
cp slay_mode %i/etc
mkdir -p %i/share/man/man1
cp slay.1 %i/share/man/man1
<<
Description: Kills all of a user's processes
DescDetail: <<
Slay provides you with a way to quickly get rid of all processes
selected user owns. Very useful if you want to harm somebody.
<<
License: GPL
Maintainer: Chris Zubrzycki
Homepage: http://packages.debian.org/unstable/admin/slay.html

slay stable port .patch

diff -ruN slay-1.2.orig/changelog slay-1.2/changelog
--- slay-1.2.orig/changelog 1969-12-31 19:00:00.000000000 -0500
+++ slay-1.2/changelog 2002-06-20 08:29:08.000000000 -0400
@@ -0,0 +1,6 @@
+slay (1.2-1)
+
+ * Initial Release.
+ * Taken from Debian, slay-1.2-14
+
+ -- Chris Zubrzycki Wed, 19 Jun 2002 08:37:51 -0400
diff -ruN slay-1.2.orig/changelog.debian slay-1.2/changelog.debian
--- slay-1.2.orig/changelog.debian 1969-12-31 19:00:00.000000000 -0500
+++ slay-1.2/changelog.debian 2002-06-20 08:29:08.000000000 -0400
@@ -0,0 +1,104 @@
+slay (1.2-14) unstable; urgency=low
+
+ * Changed some debconf templates (closes: #137245)
+
+ -- Pawel Wiecek Mon, 18 Mar 2002 21:56:13 +0100
+
+slay (1.2-13) unstable; urgency=low
+
+ * Fixed a bug in debian/{config,postinst} that caused them to fail on new
+ installs
+
+ -- Pawel Wiecek Wed, 18 Jul 2001 14:39:09 +0200
+
+slay (1.2-12) unstable; urgency=low
+
+ * Additional fixes to debian/{config,postinst} (thanks to Andrew Shugg
+ )
+ * Updated standards version
+ * dpkg-reconfigure slay now works
+
+ -- Pawel Wiecek Fri, 8 Jun 2001 13:38:00 +0200
+
+slay (1.2-11) unstable; urgency=low
+
+ * Added Polish translation of debconf templates
+ * Fixed a typo in debian/changelog for previous release :^)
+ * Switched to debhelper 2
+
+ -- Pawel Wiecek Tue, 22 May 2001 12:43:22 +0200
+
+slay (1.2-10) unstable; urgency=low
+
+ * Fixed a bug in debian/{config,postinst} -- apparently real test is BROKEN
+ and doesn't understand ']' at the end of its command line when called as
+ '[' (closes: #98196)
+
+ -- Pawel Wiecek Mon, 21 May 2001 14:19:53 +0200
+
+slay (1.2-9) unstable; urgency=low
+
+ * Fixed a bug in configuration code that got introduced in 1.2-8
+
+ -- Pawel Wiecek Thu, 8 Mar 2001 14:07:15 +0100
+
+slay (1.2-8) unstable; urgency=low
+
+ * Fixed a type (closes: #84638)
+ * Downgraded prompts priority (closes: #83999)
+ * /etc/slay_mode is no longer a conffile (violated policy!)
+ * Only ask questions if necessary
+ * Renamed BH to SLAY_BUTTHEAD
+
+ -- Pawel Wiecek Tue, 6 Mar 2001 11:17:22 +0100
+
+slay (1.2-7) unstable; urgency=low
+
+ * Cleaned-up the configuration stuff
+ * Updated to newest standards version, switched to debhelper and debconf
+
+ -- Pawel Wiecek Mon, 18 Dec 2000 14:36:40 +0100
+
+slay (1.2-6) unstable frozen; urgency=low
+
+ * Fixed a bug in punishing (fixes #43886, #46260)
+
+ -- Pawel Wiecek Tue, 26 Oct 1999 00:27:20 +0200
+
+slay (1.2-5) unstable frozen; urgency=low
+
+ * Slay doesn't punish illegitimate users by default (fixes bug #25298)
+ * Documented the feature mentioned above (ditto)
+ * Moved to /usr/sbin, as it really belongs there
+ * Updated Standards-Version
+
+ -- Pawel Wiecek Tue, 26 Oct 1999 00:26:45 +0200
+
+slay (1.2-4) unstable; urgency=low
+
+ * Filter annoying diagnostic messages from write and kill to /dev/null.
+ (fixes bug #12320)
+
+ -- Pawel Wiecek Fri, 12 Sep 1997 00:21:35 +0200
+
+slay (1.2-3) unstable; urgency=low
+
+ * Modified slightly so everyone can use ButtHead mode
+
+ -- Pawel Wiecek Fri, 15 Aug 1997 01:22:31 +0200
+
+slay (1.2-2) unstable; urgency=low
+
+ * Added a short manpage (fixes bug #11937)
+
+ -- Pawel Wiecek Sun, 10 Aug 1997 19:36:52 +0200
+
+slay (1.2-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Pawel Wiecek Thu, 29 May 1997 23:59:31 +0200
+
+Local variables:
+mode: debian-changelog
+End:
diff -ruN slay-1.2.orig/copyright slay-1.2/copyright
--- slay-1.2.orig/copyright 1969-12-31 19:00:00.000000000 -0500
+++ slay-1.2/copyright 2002-06-20 08:29:43.000000000 -0400
@@ -0,0 +1,9 @@
+This package was debianized by Pawel Wiecek coven@pwr.wroc.pl on
+Thu, 29 May 1997 23:59:31 +0200.
+
+It was downloaded from
+ ftp://sunsite.unc.edu/pub/Linux/system/Admin/Slay.1.2.tar.gz
+
+Copyright:
+ This is a free software distributed according to terms of GNU GPL.
+
diff -ruN slay-1.2.orig/slay slay-1.2/slay
--- slay-1.2.orig/slay 1996-02-07 17:18:38.000000000 -0500
+++ slay-1.2/slay 2002-06-20 08:29:08.000000000 -0400
@@ -5,6 +5,7 @@
# based on kall (a script of unknown origin)
# Please mail me any suggestions or corrections.
# Donations welcome.
+# Changes by Pawel Wiecek

# Revision history:
# 0.99 First attempt.
@@ -15,10 +16,37 @@
USER=`whoami`
SIGNAL=`echo $1 | grep '^\-.*'`
ME=`basename $0`
-COOL='0'
-MODE='mean' # Mean mode gives retribution for incorrect usage.
-BH='off' # Turning on BH makes the responses more interesting...
- # Try it sometime.
+COOL='1'
+
+# this piece of nested ifs is added for Debian package only
+if [ -f @FINK_IPREFIX@/etc/slay_mode ]
+then
+ if grep -q mean @FINK_IPREFIX@/etc/slay_mode
+ then
+ MODE='mean'
+ fi
+ if grep -q nice @FINK_IPREFIX@/etc/slay_mode
+ then
+ MODE='nice'
+ fi
+ if [ -z $SLAY_BUTTHEAD ]
+ then
+ if grep -q butthead @FINK_IPREFIX@/etc/slay_mode
+ then
+ SLAY_BUTTHEAD='on'
+ fi
+ if grep -q normal @FINK_IPREFIX@/etc/slay_mode
+ then
+ SLAY_BUTTHEAD='off'
+ fi
+ fi
+else
+ MODE='mean'
+ if [ -z $SLAY_BUTTHEAD ]
+ then
+ SLAY_BUTTHEAD='off'
+ fi
+fi

# Command line handling.
if [ "$SIGNAL" != "" ]; then
@@ -30,7 +58,7 @@
# Help for loosers.
if [ "$1" = "" -o "$1" = "--help" ]; then
echo "usage: $ME [-signal] name [name...]"
- if [ "$BH" = "on" ]; then
+ if [ "$SLAY_BUTTHEAD" = "on" ]; then
echo " Like, kills people and stuff."
else echo " Kills all processes belonging to any of the given names."
fi
@@ -41,8 +69,8 @@
if [ "$USER" != "$1" ]; then
if [ "$USER" != "root" ]; then
if [ "$MODE" = "mean" ]; then
- $ME -KILL $USER
- else if [ "$BH" = "on" ]; then
+ $0 -KILL $USER
+ else if [ "$SLAY_BUTTHEAD" = "on" ]; then
echo "${ME}: Cut it out."
else echo "${ME}: Only root gets to do that."
fi
@@ -59,26 +87,26 @@
rprocs=`ps caux | awk '{if(user == $1) print $2}' user=$1 -`
if [ "$rprocs" != "" ]; then
if [ "$1" = "$USER" ]; then
- if [ "$BH" = "on" ]; then
+ if [ "$SLAY_BUTTHEAD" = "on" ]; then
echo "${ME}: Beavis, don't make me have to smack you."
else echo "${ME}: Illegal operation."
fi
fi
COOL="1"
- if [ "$BH" = "on" ]; then
+ if [ "$SLAY_BUTTHEAD" = "on" ]; then
echo "${ME}: $SIGNAL is kicking $1's butt!"
- echo -e "\\fI'm kicking your butt.\\f" | write $1
+ echo -e "\\fI'm kicking your butt.\\f" | write $1 2>/dev/null
else echo "${ME}: Sending $SIGNAL signal to $1's process(es)..."
- echo -e "\\fYour current session has been terminated.\\f" | write $1
+ echo -e "\\fYour current session has been terminated.\\f" | write $1 2>/dev/null
fi
- kill $SIGNAL $rprocs
+ kill $SIGNAL $rprocs 2>/dev/null
fi
shift
done

# Error message.
if [ $COOL = "0" ]; then
- if [ "$BH" = "on" ]; then
+ if [ "$SLAY_BUTTHEAD" = "on" ]; then
echo "${ME}: How old are you, Beavis?"
else echo "${ME}: "Nothing done.
fi
@@ -87,7 +115,7 @@

# Non-error message.
if [ $COOL = "1" ]; then
- if [ "$BH" = "on" ]; then
+ if [ "$SLAY_BUTTHEAD" = "on" ]; then
echo "${ME}: Whoa, I have the power supreme."
else echo "${ME}: Done."
fi
diff -ruN slay-1.2.orig/slay.1 slay-1.2/slay.1
--- slay-1.2.orig/slay.1 1969-12-31 19:00:00.000000000 -0500
+++ slay-1.2/slay.1 2002-06-20 08:29:08.000000000 -0400
@@ -0,0 +1,56 @@
+.\"
+.TH slay 1
+
+.SH NAME
+slay \- kill all processes belonging to a user
+
+.SH SYNOPSIS
+.B slay
+.B [-signal]
+.B name [name...]
+
+.SH DESCRIPTION
+.B Slay
+sends given signal (KILL by default) to all processes belonging to user(s)
+given on the command line.
+When called without arguments it displays short help.
+
+.SH OPTIONS
+There are no options.
+
+.SH ENVIRONMENT
+.B SLAY_BUTTHEAD
+\- setting
+.B SLAY_BUTTHEAD
+to
+.I on
+puts slay into Butt-head mode (which has different messages than normal mode).
+Setting it to
+.I off
+puts it into normal mode. This environment variable overrides the setting from
+.I /etc/slay_mode
+
+.SH FILES
+.B /etc/slay_mode
+\- contains mode slay works in:
+
+.I mean
+turns mean mode on. In mean mode attempts to slay people without root
+priviledges are punished. This is the default.
+
+.I nice
+turns mean mode off.
+
+.I butthead
+switched slay to Butt-head messages mode.
+
+.I normal
+switches slay to normal messages mode. This is the default.
+
+.SH BUGS
+Unknown. If there are any report them to author and/or package maintainer.
+
+.SH AUTHOR
+Slay was written by Chris Ausbrooks .
+
+This man page was written by Pawel Wiecek .
diff -ruN slay-1.2.orig/slay_mode slay-1.2/slay_mode
--- slay-1.2.orig/slay_mode 1969-12-31 19:00:00.000000000 -0500
+++ slay-1.2/slay_mode 2002-06-20 08:29:08.000000000 -0400
@@ -0,0 +1,2 @@
+nice
+normal

slay _unstable_ port .patch