diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..76edeb4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,125 @@ +slay (2.0) unstable; urgency=low + + * Because slay seems to be no longer maintained upstream and I'm changing it + quite significantly it now becomes a Debian native package + * Changed method used to select users processes to a foolproof one + (closes: #102316, #102318, #214207) + * Added -clean killing mode (closes: #182412) + * Converted debconf templates to gettext format and added french + translations from Michel Grentzinger + (closes: #202802, #202801) + * Moved manual page from section 1 to section 8, since slay belongs to sbin + * Updated standards version (no changes required) + + -- Pawel Wiecek Sun, 25 Jan 2004 20:24:42 +0100 + +slay (1.2-15) unstable; urgency=low + + * Clarified documentation a bit (closes: #182410) + * Fixed description (closes: #192945) + * Added danish translation of debconf templates (closes: #174845) + * Updated Standards-version + + -- Pawel Wiecek Wed, 28 May 2003 14:12:52 +0200 + +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 + diff --git a/debian/conffiles b/debian/conffiles new file mode 100644 index 0000000..e69de29 diff --git a/debian/config b/debian/config new file mode 100755 index 0000000..b1c9fc6 --- /dev/null +++ b/debian/config @@ -0,0 +1,21 @@ +#!/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Ask questions... IF NECESSARY +if test -n "$2" +then + if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 -o ! -e /etc/slay_mode \ + -o $1 = reconfigure + then + db_input low slay/punish || true + db_input low slay/butthead || true + db_go + if test $1 = reconfigure -a -e /etc/slay_mode + then + rm /etc/slay_mode + # this is an extremely ugly hack + fi + fi +fi diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ec4d125 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: slay +Section: admin +Priority: optional +Maintainer: Pawel Wiecek +Build-Depends-Indep: debhelper (>= 4.1.16) +Standards-Version: 3.6.1 + +Package: slay +Architecture: all +Depends: debconf +Description: Kills all of the user's processes + Slay provides you with a way to quickly get rid of all + processes a particular user owns. Very useful if you want + to harm somebody. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..43da8fe --- /dev/null +++ b/debian/copyright @@ -0,0 +1,11 @@ +This package was debianized by Pawel Wiecek on +Thu, 29 May 1997 23:59:31 +0200. + +It was originally written by Chris Ausbrooks +and downloaded from + ftp://sunsite.unc.edu/pub/Linux/system/Admin/Slay.1.2.tar.gz +Subsequently it was heavily rewritten for Debian. + +Copyright: + This is a free software distributed according to terms of GNU GPL (see + /usr/share/common-licenses/GPL) diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..0e838db --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/sbin +etc diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/debian/po/da.po b/debian/po/da.po new file mode 100644 index 0000000..cd1af58 --- /dev/null +++ b/debian/po/da.po @@ -0,0 +1,65 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-07-22 01:14+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../templates:4 +msgid "Shall slay punish users?" +msgstr "Skal slay straffe brugere?" + +#. Description +#: ../templates:4 +msgid "" +"Normally slay will punish ordinary users trying to run it by slaying " +"themselves. This is The Right Thing(TM), as users should not mess with " +"administrative commands like slay, but some administrators find it " +"inconvenient. Therefore slay can be configured to punish users or just to " +"display error message." +msgstr "" +"Normalt vil slay straffe almindelige brugere, der prřver at křre den ved at " +"slaye sig selv. Dette er det rigtige, eftersom brugere ikke břr rode med " +"administrative kommandoer som slay, men nogen administratorere synes ikke " +"det er passende. Derfor kan slay konfigureres til at straffe brugere eller " +"bare vise fejlbeskeder." + +#. Description +#: ../templates:14 +msgid "Shall slay use `Butt-head' mode by default?" +msgstr "Skal slay bruge `Butt-head'-tilstanden som standard?" + +#. Description +#: ../templates:14 +msgid "" +"Slay has two sets of messages: a standard set and an alternative set that is " +"more informal. The alternative set is named after \"Butt-head\" from MTV's " +"\"Beavis & Butt-head\" cartoon show, a character who uses the sort of " +"language you'll find in the alternative set. In most cases, the standard " +"set of messages is more appropriate." +msgstr "" +"Slay har to sćt beskeder: Et standard sćt og et alternativt sćt der er " +"mindre uformelt. Det alternative sćt er navngivet efter \"Butt-head\" fra " +"MTV's \"Beavis & Butt-head\" tegneserier, en figur der bruger den form for " +"sprog, der findes i det alternative sćt. I de fleste tilfćlde er " +"standardsćttet det mest passende." diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 0000000..7c8de56 --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,64 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: slay_1.2-15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-07-22 01:14+0200\n" +"PO-Revision-Date: 2003-07-22 13:42+0200\n" +"Last-Translator: Michel Grentzinger \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../templates:4 +msgid "Shall slay punish users?" +msgstr "Slay doit-il punir les utilisateurs ?" + +#. Description +#: ../templates:4 +msgid "" +"Normally slay will punish ordinary users trying to run it by slaying " +"themselves. This is The Right Thing(TM), as users should not mess with " +"administrative commands like slay, but some administrators find it " +"inconvenient. Therefore slay can be configured to punish users or just to " +"display error message." +msgstr "" +"Habituellement, slay punit les utilisateurs ordinaires qui tentent de le " +"lancer en utilisant slay contre eux-męmes (ce qui revient ŕ tuer tous les " +"processus leur appartenant). C'est le Bon Comportement, afin d'éviter que " +"les utilisateurs ne fassent n'importe quoi avec les commandes " +"d'administration telles que slay, mais certains administrateurs trouvent " +"cela abusif. Par conséquent, slay peut ętre configuré pour punir les " +"utilisateurs ou pour simplement afficher un message d'erreur." + +#. Description +#: ../templates:14 +msgid "Shall slay use `Butt-head' mode by default?" +msgstr "Slay doit-il utiliser le mode Ť Butt-head ť par défaut ?" + +#. Description +#: ../templates:14 +msgid "" +"Slay has two sets of messages: a standard set and an alternative set that is " +"more informal. The alternative set is named after \"Butt-head\" from MTV's " +"\"Beavis & Butt-head\" cartoon show, a character who uses the sort of " +"language you'll find in the alternative set. In most cases, the standard " +"set of messages is more appropriate." +msgstr "" +"Slay possčde deux jeux de messages : un jeu standard et un jeu de " +"remplacement, plus informel. Le jeu de remplacement est nommé Ť Butt-head ť " +"d'aprčs le dessin animé Ť Beavis & Butt-head ť sur MTV ; un des personnages " +"y emploie le genre de langage que vous trouverez dans le jeu de " +"remplacement. Dans la plupart des cas, le jeu standard est plus approprié." diff --git a/debian/po/pl.po b/debian/po/pl.po new file mode 100644 index 0000000..d3110d1 --- /dev/null +++ b/debian/po/pl.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-07-22 01:14+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../templates:4 +msgid "Shall slay punish users?" +msgstr "Czy slay powinien karać użytkowników?" + +#. Description +#: ../templates:4 +msgid "" +"Normally slay will punish ordinary users trying to run it by slaying " +"themselves. This is The Right Thing(TM), as users should not mess with " +"administrative commands like slay, but some administrators find it " +"inconvenient. Therefore slay can be configured to punish users or just to " +"display error message." +msgstr "" +"Standardowo slay karze zwykłych użytkowników usiłujących go uruchomić " +"zabijając ich samych. To jest Właściwe Zachowanie, gdyż komendy " +"administracyjne, takie jak slay, nie są przeznaczone dla zwykłych " +"śmiertelników, ale niektórzy administratorzy uważają, że jest to niewygodne. " +"Wobec tego slay może być skonfigurowany tak, aby karał użytkowników, albo " +"tak, aby tylko wyświetlał komunikat o błędzie." + +#. Description +#: ../templates:14 +msgid "Shall slay use `Butt-head' mode by default?" +msgstr "Czy slay powinien domyślnie używać trybu `Butt-head'?" + +#. Description +#: ../templates:14 +msgid "" +"Slay has two sets of messages: a standard set and an alternative set that is " +"more informal. The alternative set is named after \"Butt-head\" from MTV's " +"\"Beavis & Butt-head\" cartoon show, a character who uses the sort of " +"language you'll find in the alternative set. In most cases, the standard " +"set of messages is more appropriate." +msgstr "" +"Slay ma dwa zestawy komunikatów: standardowe (które są odpowiednie w " +"większości przypadków) i alternatywne, które są o wiele mniej oficjalne. Ten " +"drugi zestaw jest nazwany od Butt-heada z kreskówki MTV `Beavis & Butt-" +"head', ze względu na swój styl. Zestawy komunikatów można przełączać w miarę " +"potrzeb, ale jeden z nich będzie domyślny." diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..c1b2453 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,55 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2003-07-22 01:14+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Description +#: ../templates:4 +msgid "Shall slay punish users?" +msgstr "" + +#. Description +#: ../templates:4 +msgid "" +"Normally slay will punish ordinary users trying to run it by slaying " +"themselves. This is The Right Thing(TM), as users should not mess with " +"administrative commands like slay, but some administrators find it " +"inconvenient. Therefore slay can be configured to punish users or just to " +"display error message." +msgstr "" + +#. Description +#: ../templates:14 +msgid "Shall slay use `Butt-head' mode by default?" +msgstr "" + +#. Description +#: ../templates:14 +msgid "" +"Slay has two sets of messages: a standard set and an alternative set that is " +"more informal. The alternative set is named after \"Butt-head\" from MTV's " +"\"Beavis & Butt-head\" cartoon show, a character who uses the sort of " +"language you'll find in the alternative set. In most cases, the standard " +"set of messages is more appropriate." +msgstr "" diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..1d44fb7 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,32 @@ +#!/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Build config file based on answers... IF NECESSARY ONLY +if test -n "$2" +then + if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 -o ! -e /etc/slay_mode + then + + db_get slay/punish + if [ "$RET" = "true" ] + then + echo "mean" > /etc/slay_mode + else + echo "nice" > /etc/slay_mode + fi + + db_get slay/butthead + if [ "$RET" = "true" ] + then + echo "butthead" >> /etc/slay_mode + else + echo "normal" >> /etc/slay_mode + fi + + fi +fi +# (yes, I know this was ugly) + +#DEBHELPER# diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..09e28bf --- /dev/null +++ b/debian/rules @@ -0,0 +1,85 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. +# $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. +# -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. +# $(MAKE) install DESTDIR=`pwd`/debian/tmp + install -o root -g root -m 755 slay debian/slay/usr/sbin + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron + dh_installman slay.8 +# dh_installinfo +# dh_undocumented + dh_installchangelogs +# dh_link + dh_strip + dh_compress + dh_fixperms +# # You may want to make some executables suid here. +# dh_suidregister +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/debian/templates b/debian/templates new file mode 100644 index 0000000..5829bb5 --- /dev/null +++ b/debian/templates @@ -0,0 +1,19 @@ +Template: slay/punish +Type: boolean +Default: false +_Description: Shall slay punish users? + Normally slay will punish ordinary users trying to run it by slaying + themselves. This is The Right Thing(TM), as users should not mess with + administrative commands like slay, but some administrators find it + inconvenient. Therefore slay can be configured to punish users or just to + display error message. + +Template: slay/butthead +Type: boolean +Default: false +_Description: Shall slay use `Butt-head' mode by default? + Slay has two sets of messages: a standard set and an alternative set that + is more informal. The alternative set is named after "Butt-head" from + MTV's "Beavis & Butt-head" cartoon show, a character who uses the sort of + language you'll find in the alternative set. In most cases, the standard + set of messages is more appropriate. diff --git a/slay b/slay new file mode 100755 index 0000000..e82fb42 --- /dev/null +++ b/slay @@ -0,0 +1,155 @@ +#!/bin/sh +# +# slay 2.0 - kill all processes belonging to the specified user(s). +# originally by Chris Ausbrooks +# based on kall (a script of unknown origin) +# Heavily rewritten by Pawel Wiecek for Debian + +# Revision history: +# 0.99 First attempt. +# 1.0 Added Butthead. +# 1.1 Added retribution. +# 1.2 Added slayee notification. +# 2.0 Completely rewritten + +USER=`whoami` +SIGNAL=`echo $1 | grep '^\-.*'` +ME=`basename $0` +COOL='0' + +# this piece of nested ifs is added for Debian package only +if [ -f /etc/slay_mode ] +then + if grep -q mean /etc/slay_mode + then + MODE='mean' + fi + if grep -q nice /etc/slay_mode + then + MODE='nice' + fi + if [ -z $SLAY_BUTTHEAD ] + then + if grep -q butthead /etc/slay_mode + then + SLAY_BUTTHEAD='on' + fi + if grep -q normal /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 + shift +else + SIGNAL="-KILL" +fi + +if [ "$SIGNAL" != "-clean" ] +then + SIGSHOW="$SIGNAL" +else + SIGSHOW="-TERM + -KILL" +fi + +# Help for loosers. +if [ "$1" = "" -o "$1" = "--help" ] +then + echo "usage: $ME [-signal] name [name...]" + if [ "$SLAY_BUTTHEAD" = "on" ] + then + echo " Like, kills people and stuff." + echo " With -clean kicks ass forst and then does real pain." + else + echo " Kills all processes belonging to any of the given names." + echo " Use -clean as a signal name to kill with TERM first and then with KILL." + fi + exit -1 +fi + +# Misuse trap. +if [ "$USER" != "$1" ] +then + if [ "$USER" != "root" ] + then + if [ "$MODE" = "mean" ] + 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 + fi + exit 2 + fi +fi + +# Main body. +while [ "$1" != "" ] +do + if [ "$1" = "$USER" ] + 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 [ "$SLAY_BUTTHEAD" = "on" ] + then + echo "${ME}: $SIGSHOW is kicking $1's butt!" + echo -e "\\n\\n\\nI'm kicking your butt.\\n\\n\\n" | write $1 2>/dev/null + else + echo "${ME}: Sending $SIGSHOW signal to $1's process(es)..." + echo -e "\\n\\n\\nYour current session has been terminated.\\n\\n\\n" | \ + write $1 2>/dev/null + fi + if [ "$SIGNAL" = "-clean" ] + then + su -m $USER -c "kill -TERM -1 2>/dev/null" + sleep 10 + su -m $USER -c "kill -KILL -1 2>/dev/null" + else + su -m $USER -c "kill $SIGNAL -1 2>/dev/null" + fi + shift +done + +# Error message. +if [ $COOL = "0" ] +then + if [ "$SLAY_BUTTHEAD" = "on" ] + then + echo "${ME}: How old are you, Beavis?" + else + echo "${ME}: Nothing done." + fi + exit 1 +fi + +# Non-error message. +if [ $COOL = "1" ] +then + if [ "$SLAY_BUTTHEAD" = "on" ] + then + echo "${ME}: Whoa, I have the power supreme." + else + echo "${ME}: Done." + fi + exit 0 +fi diff --git a/slay.8 b/slay.8 new file mode 100644 index 0000000..a954988 --- /dev/null +++ b/slay.8 @@ -0,0 +1,68 @@ +.\" +.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. + +You can use +.B -clean +as a signal name, in that case a "clean kill" is done, that is processes are +first sent +.B TERM +signal and after 10 seconds those that haven't terminated yet are killed with +.B KILL + +.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 keywords describing the mode slay works in, separated by +newlines: + +.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. + +You can only use one of mean/nice keywords and one of butthead/normal +keywords. + +.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 .