Codebase list slay / 0c0ea48
Import Debian slay 2.0 Imported slay-2.0 into Mercurial repository Pawel Wiecek 15 years ago
16 changed file(s) with 783 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 slay (2.0) unstable; urgency=low
1
2 * Because slay seems to be no longer maintained upstream and I'm changing it
3 quite significantly it now becomes a Debian native package
4 * Changed method used to select users processes to a foolproof one
5 (closes: #102316, #102318, #214207)
6 * Added -clean killing mode (closes: #182412)
7 * Converted debconf templates to gettext format and added french
8 translations from Michel Grentzinger <mic.grentz@online.fr>
9 (closes: #202802, #202801)
10 * Moved manual page from section 1 to section 8, since slay belongs to sbin
11 * Updated standards version (no changes required)
12
13 -- Pawel Wiecek <coven@debian.org> Sun, 25 Jan 2004 20:24:42 +0100
14
15 slay (1.2-15) unstable; urgency=low
16
17 * Clarified documentation a bit (closes: #182410)
18 * Fixed description (closes: #192945)
19 * Added danish translation of debconf templates (closes: #174845)
20 * Updated Standards-version
21
22 -- Pawel Wiecek <coven@debian.org> Wed, 28 May 2003 14:12:52 +0200
23
24 slay (1.2-14) unstable; urgency=low
25
26 * Changed some debconf templates (closes: #137245)
27
28 -- Pawel Wiecek <coven@debian.org> Mon, 18 Mar 2002 21:56:13 +0100
29
30 slay (1.2-13) unstable; urgency=low
31
32 * Fixed a bug in debian/{config,postinst} that caused them to fail on new
33 installs
34
35 -- Pawel Wiecek <coven@debian.org> Wed, 18 Jul 2001 14:39:09 +0200
36
37 slay (1.2-12) unstable; urgency=low
38
39 * Additional fixes to debian/{config,postinst} (thanks to Andrew Shugg
40 <andrew@neep.com.au>)
41 * Updated standards version
42 * dpkg-reconfigure slay now works
43
44 -- Pawel Wiecek <coven@debian.org> Fri, 8 Jun 2001 13:38:00 +0200
45
46 slay (1.2-11) unstable; urgency=low
47
48 * Added Polish translation of debconf templates
49 * Fixed a typo in debian/changelog for previous release :^)
50 * Switched to debhelper 2
51
52 -- Pawel Wiecek <coven@debian.org> Tue, 22 May 2001 12:43:22 +0200
53
54 slay (1.2-10) unstable; urgency=low
55
56 * Fixed a bug in debian/{config,postinst} -- apparently real test is BROKEN
57 and doesn't understand ']' at the end of its command line when called as
58 '[' (closes: #98196)
59
60 -- Pawel Wiecek <coven@debian.org> Mon, 21 May 2001 14:19:53 +0200
61
62 slay (1.2-9) unstable; urgency=low
63
64 * Fixed a bug in configuration code that got introduced in 1.2-8
65
66 -- Pawel Wiecek <coven@debian.org> Thu, 8 Mar 2001 14:07:15 +0100
67
68 slay (1.2-8) unstable; urgency=low
69
70 * Fixed a type (closes: #84638)
71 * Downgraded prompts priority (closes: #83999)
72 * /etc/slay_mode is no longer a conffile (violated policy!)
73 * Only ask questions if necessary
74 * Renamed BH to SLAY_BUTTHEAD
75
76 -- Pawel Wiecek <coven@debian.org> Tue, 6 Mar 2001 11:17:22 +0100
77
78 slay (1.2-7) unstable; urgency=low
79
80 * Cleaned-up the configuration stuff
81 * Updated to newest standards version, switched to debhelper and debconf
82
83 -- Pawel Wiecek <coven@debian.org> Mon, 18 Dec 2000 14:36:40 +0100
84
85 slay (1.2-6) unstable frozen; urgency=low
86
87 * Fixed a bug in punishing (fixes #43886, #46260)
88
89 -- Pawel Wiecek <coven@debian.org> Tue, 26 Oct 1999 00:27:20 +0200
90
91 slay (1.2-5) unstable frozen; urgency=low
92
93 * Slay doesn't punish illegitimate users by default (fixes bug #25298)
94 * Documented the feature mentioned above (ditto)
95 * Moved to /usr/sbin, as it really belongs there
96 * Updated Standards-Version
97
98 -- Pawel Wiecek <coven@debian.org> Tue, 26 Oct 1999 00:26:45 +0200
99
100 slay (1.2-4) unstable; urgency=low
101
102 * Filter annoying diagnostic messages from write and kill to /dev/null.
103 (fixes bug #12320)
104
105 -- Pawel Wiecek <coven@pwr.wroc.pl> Fri, 12 Sep 1997 00:21:35 +0200
106
107 slay (1.2-3) unstable; urgency=low
108
109 * Modified slightly so everyone can use ButtHead mode
110
111 -- Pawel Wiecek <coven@pwr.wroc.pl> Fri, 15 Aug 1997 01:22:31 +0200
112
113 slay (1.2-2) unstable; urgency=low
114
115 * Added a short manpage (fixes bug #11937)
116
117 -- Pawel Wiecek <coven@pwr.wroc.pl> Sun, 10 Aug 1997 19:36:52 +0200
118
119 slay (1.2-1) unstable; urgency=low
120
121 * Initial Release.
122
123 -- Pawel Wiecek <coven@pwr.wroc.pl> Thu, 29 May 1997 23:59:31 +0200
124
(New empty file)
0 #!/bin/sh -e
1
2 # Source debconf library.
3 . /usr/share/debconf/confmodule
4
5 # Ask questions... IF NECESSARY
6 if test -n "$2"
7 then
8 if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 -o ! -e /etc/slay_mode \
9 -o $1 = reconfigure
10 then
11 db_input low slay/punish || true
12 db_input low slay/butthead || true
13 db_go
14 if test $1 = reconfigure -a -e /etc/slay_mode
15 then
16 rm /etc/slay_mode
17 # this is an extremely ugly hack
18 fi
19 fi
20 fi
0 Source: slay
1 Section: admin
2 Priority: optional
3 Maintainer: Pawel Wiecek <coven@debian.org>
4 Build-Depends-Indep: debhelper (>= 4.1.16)
5 Standards-Version: 3.6.1
6
7 Package: slay
8 Architecture: all
9 Depends: debconf
10 Description: Kills all of the user's processes
11 Slay provides you with a way to quickly get rid of all
12 processes a particular user owns. Very useful if you want
13 to harm somebody.
0 This package was debianized by Pawel Wiecek <coven@debian.org> on
1 Thu, 29 May 1997 23:59:31 +0200.
2
3 It was originally written by Chris Ausbrooks <fish@bucket.ualr.edu>
4 and downloaded from
5 ftp://sunsite.unc.edu/pub/Linux/system/Admin/Slay.1.2.tar.gz
6 Subsequently it was heavily rewritten for Debian.
7
8 Copyright:
9 This is a free software distributed according to terms of GNU GPL (see
10 /usr/share/common-licenses/GPL)
0 usr/sbin
1 etc
0 [type: gettext/rfc822deb] templates
0 #
1 # Translators, if you are not familiar with the PO format, gettext
2 # documentation is worth reading, especially sections dedicated to
3 # this format, e.g. by running:
4 # info -n '(gettext)PO Files'
5 # info -n '(gettext)Header Entry'
6 #
7 # Some information specific to po-debconf are available at
8 # /usr/share/doc/po-debconf/README-trans
9 # or http://www.debian.org/intl/l10n/po-debconf/README-trans
10 #
11 # Developers do not need to manually edit POT or PO files.
12 #
13 #, fuzzy
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: PACKAGE VERSION\n"
17 "Report-Msgid-Bugs-To: \n"
18 "POT-Creation-Date: 2003-07-22 01:14+0200\n"
19 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
20 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
21 "Language-Team: LANGUAGE <LL@li.org>\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=ISO-8859-1\n"
24 "Content-Transfer-Encoding: 8bit\n"
25
26 #. Description
27 #: ../templates:4
28 msgid "Shall slay punish users?"
29 msgstr "Skal slay straffe brugere?"
30
31 #. Description
32 #: ../templates:4
33 msgid ""
34 "Normally slay will punish ordinary users trying to run it by slaying "
35 "themselves. This is The Right Thing(TM), as users should not mess with "
36 "administrative commands like slay, but some administrators find it "
37 "inconvenient. Therefore slay can be configured to punish users or just to "
38 "display error message."
39 msgstr ""
40 "Normalt vil slay straffe almindelige brugere, der prøver at køre den ved at "
41 "slaye sig selv. Dette er det rigtige, eftersom brugere ikke bør rode med "
42 "administrative kommandoer som slay, men nogen administratorere synes ikke "
43 "det er passende. Derfor kan slay konfigureres til at straffe brugere eller "
44 "bare vise fejlbeskeder."
45
46 #. Description
47 #: ../templates:14
48 msgid "Shall slay use `Butt-head' mode by default?"
49 msgstr "Skal slay bruge `Butt-head'-tilstanden som standard?"
50
51 #. Description
52 #: ../templates:14
53 msgid ""
54 "Slay has two sets of messages: a standard set and an alternative set that is "
55 "more informal. The alternative set is named after \"Butt-head\" from MTV's "
56 "\"Beavis & Butt-head\" cartoon show, a character who uses the sort of "
57 "language you'll find in the alternative set. In most cases, the standard "
58 "set of messages is more appropriate."
59 msgstr ""
60 "Slay har to sæt beskeder: Et standard sæt og et alternativt sæt der er "
61 "mindre uformelt. Det alternative sæt er navngivet efter \"Butt-head\" fra "
62 "MTV's \"Beavis & Butt-head\" tegneserier, en figur der bruger den form for "
63 "sprog, der findes i det alternative sæt. I de fleste tilfælde er "
64 "standardsættet det mest passende."
0 #
1 # Translators, if you are not familiar with the PO format, gettext
2 # documentation is worth reading, especially sections dedicated to
3 # this format, e.g. by running:
4 # info -n '(gettext)PO Files'
5 # info -n '(gettext)Header Entry'
6 # Some information specific to po-debconf are available at
7 # /usr/share/doc/po-debconf/README-trans
8 # or http://www.debian.org/intl/l10n/po-debconf/README-trans#
9 # Developers do not need to manually edit POT or PO files.
10 #
11 msgid ""
12 msgstr ""
13 "Project-Id-Version: slay_1.2-15\n"
14 "Report-Msgid-Bugs-To: \n"
15 "POT-Creation-Date: 2003-07-22 01:14+0200\n"
16 "PO-Revision-Date: 2003-07-22 13:42+0200\n"
17 "Last-Translator: Michel Grentzinger <mic.grentz@online.fr>\n"
18 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
19 "MIME-Version: 1.0\n"
20 "Content-Type: text/plain; charset=ISO-8859-15\n"
21 "Content-Transfer-Encoding: 8bit\n"
22
23 #. Description
24 #: ../templates:4
25 msgid "Shall slay punish users?"
26 msgstr "Slay doit-il punir les utilisateurs ?"
27
28 #. Description
29 #: ../templates:4
30 msgid ""
31 "Normally slay will punish ordinary users trying to run it by slaying "
32 "themselves. This is The Right Thing(TM), as users should not mess with "
33 "administrative commands like slay, but some administrators find it "
34 "inconvenient. Therefore slay can be configured to punish users or just to "
35 "display error message."
36 msgstr ""
37 "Habituellement, slay punit les utilisateurs ordinaires qui tentent de le "
38 "lancer en utilisant slay contre eux-mêmes (ce qui revient à tuer tous les "
39 "processus leur appartenant). C'est le Bon Comportement, afin d'éviter que "
40 "les utilisateurs ne fassent n'importe quoi avec les commandes "
41 "d'administration telles que slay, mais certains administrateurs trouvent "
42 "cela abusif. Par conséquent, slay peut être configuré pour punir les "
43 "utilisateurs ou pour simplement afficher un message d'erreur."
44
45 #. Description
46 #: ../templates:14
47 msgid "Shall slay use `Butt-head' mode by default?"
48 msgstr "Slay doit-il utiliser le mode « Butt-head » par défaut ?"
49
50 #. Description
51 #: ../templates:14
52 msgid ""
53 "Slay has two sets of messages: a standard set and an alternative set that is "
54 "more informal. The alternative set is named after \"Butt-head\" from MTV's "
55 "\"Beavis & Butt-head\" cartoon show, a character who uses the sort of "
56 "language you'll find in the alternative set. In most cases, the standard "
57 "set of messages is more appropriate."
58 msgstr ""
59 "Slay possède deux jeux de messages : un jeu standard et un jeu de "
60 "remplacement, plus informel. Le jeu de remplacement est nommé « Butt-head » "
61 "d'après le dessin animé « Beavis & Butt-head » sur MTV ; un des personnages "
62 "y emploie le genre de langage que vous trouverez dans le jeu de "
63 "remplacement. Dans la plupart des cas, le jeu standard est plus approprié."
0 #
1 # Translators, if you are not familiar with the PO format, gettext
2 # documentation is worth reading, especially sections dedicated to
3 # this format, e.g. by running:
4 # info -n '(gettext)PO Files'
5 # info -n '(gettext)Header Entry'
6 #
7 # Some information specific to po-debconf are available at
8 # /usr/share/doc/po-debconf/README-trans
9 # or http://www.debian.org/intl/l10n/po-debconf/README-trans
10 #
11 # Developers do not need to manually edit POT or PO files.
12 #
13 #, fuzzy
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: PACKAGE VERSION\n"
17 "Report-Msgid-Bugs-To: \n"
18 "POT-Creation-Date: 2003-07-22 01:14+0200\n"
19 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
20 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
21 "Language-Team: LANGUAGE <LL@li.org>\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=ISO-8859-2\n"
24 "Content-Transfer-Encoding: 8bit\n"
25
26 #. Description
27 #: ../templates:4
28 msgid "Shall slay punish users?"
29 msgstr "Czy slay powinien karaæ u¿ytkowników?"
30
31 #. Description
32 #: ../templates:4
33 msgid ""
34 "Normally slay will punish ordinary users trying to run it by slaying "
35 "themselves. This is The Right Thing(TM), as users should not mess with "
36 "administrative commands like slay, but some administrators find it "
37 "inconvenient. Therefore slay can be configured to punish users or just to "
38 "display error message."
39 msgstr ""
40 "Standardowo slay karze zwyk³ych u¿ytkowników usi³uj±cych go uruchomiæ "
41 "zabijaj±c ich samych. To jest W³a¶ciwe Zachowanie, gdy¿ komendy "
42 "administracyjne, takie jak slay, nie s± przeznaczone dla zwyk³ych "
43 "¶miertelników, ale niektórzy administratorzy uwa¿aj±, ¿e jest to niewygodne. "
44 "Wobec tego slay mo¿e byæ skonfigurowany tak, aby kara³ u¿ytkowników, albo "
45 "tak, aby tylko wy¶wietla³ komunikat o b³êdzie."
46
47 #. Description
48 #: ../templates:14
49 msgid "Shall slay use `Butt-head' mode by default?"
50 msgstr "Czy slay powinien domy¶lnie u¿ywaæ trybu `Butt-head'?"
51
52 #. Description
53 #: ../templates:14
54 msgid ""
55 "Slay has two sets of messages: a standard set and an alternative set that is "
56 "more informal. The alternative set is named after \"Butt-head\" from MTV's "
57 "\"Beavis & Butt-head\" cartoon show, a character who uses the sort of "
58 "language you'll find in the alternative set. In most cases, the standard "
59 "set of messages is more appropriate."
60 msgstr ""
61 "Slay ma dwa zestawy komunikatów: standardowe (które s± odpowiednie w "
62 "wiêkszo¶ci przypadków) i alternatywne, które s± o wiele mniej oficjalne. Ten "
63 "drugi zestaw jest nazwany od Butt-heada z kreskówki MTV `Beavis & Butt-"
64 "head', ze wzglêdu na swój styl. Zestawy komunikatów mo¿na prze³±czaæ w miarê "
65 "potrzeb, ale jeden z nich bêdzie domy¶lny."
0 #
1 # Translators, if you are not familiar with the PO format, gettext
2 # documentation is worth reading, especially sections dedicated to
3 # this format, e.g. by running:
4 # info -n '(gettext)PO Files'
5 # info -n '(gettext)Header Entry'
6 #
7 # Some information specific to po-debconf are available at
8 # /usr/share/doc/po-debconf/README-trans
9 # or http://www.debian.org/intl/l10n/po-debconf/README-trans
10 #
11 # Developers do not need to manually edit POT or PO files.
12 #
13 #, fuzzy
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: PACKAGE VERSION\n"
17 "Report-Msgid-Bugs-To: \n"
18 "POT-Creation-Date: 2003-07-22 01:14+0200\n"
19 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
20 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
21 "Language-Team: LANGUAGE <LL@li.org>\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=CHARSET\n"
24 "Content-Transfer-Encoding: 8bit\n"
25
26 #. Description
27 #: ../templates:4
28 msgid "Shall slay punish users?"
29 msgstr ""
30
31 #. Description
32 #: ../templates:4
33 msgid ""
34 "Normally slay will punish ordinary users trying to run it by slaying "
35 "themselves. This is The Right Thing(TM), as users should not mess with "
36 "administrative commands like slay, but some administrators find it "
37 "inconvenient. Therefore slay can be configured to punish users or just to "
38 "display error message."
39 msgstr ""
40
41 #. Description
42 #: ../templates:14
43 msgid "Shall slay use `Butt-head' mode by default?"
44 msgstr ""
45
46 #. Description
47 #: ../templates:14
48 msgid ""
49 "Slay has two sets of messages: a standard set and an alternative set that is "
50 "more informal. The alternative set is named after \"Butt-head\" from MTV's "
51 "\"Beavis & Butt-head\" cartoon show, a character who uses the sort of "
52 "language you'll find in the alternative set. In most cases, the standard "
53 "set of messages is more appropriate."
54 msgstr ""
0 #!/bin/sh -e
1
2 # Source debconf library.
3 . /usr/share/debconf/confmodule
4
5 # Build config file based on answers... IF NECESSARY ONLY
6 if test -n "$2"
7 then
8 if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 -o ! -e /etc/slay_mode
9 then
10
11 db_get slay/punish
12 if [ "$RET" = "true" ]
13 then
14 echo "mean" > /etc/slay_mode
15 else
16 echo "nice" > /etc/slay_mode
17 fi
18
19 db_get slay/butthead
20 if [ "$RET" = "true" ]
21 then
22 echo "butthead" >> /etc/slay_mode
23 else
24 echo "normal" >> /etc/slay_mode
25 fi
26
27 fi
28 fi
29 # (yes, I know this was ugly)
30
31 #DEBHELPER#
0 #!/usr/bin/make -f
1 # Sample debian/rules that uses debhelper.
2 # GNU copyright 1997 to 1999 by Joey Hess.
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # This is the debhelper compatability version to use.
8 export DH_COMPAT=3
9
10 configure: configure-stamp
11 configure-stamp:
12 dh_testdir
13 # Add here commands to configure the package.
14
15
16 touch configure-stamp
17
18 build: configure-stamp build-stamp
19 build-stamp:
20 dh_testdir
21
22 # Add here commands to compile the package.
23 # $(MAKE)
24
25 touch build-stamp
26
27 clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-stamp configure-stamp
31
32 # Add here commands to clean up after the build process.
33 # -$(MAKE) clean
34
35 dh_clean
36
37 install: build
38 dh_testdir
39 dh_testroot
40 dh_clean -k
41 dh_installdirs
42
43 # Add here commands to install the package into debian/tmp.
44 # $(MAKE) install DESTDIR=`pwd`/debian/tmp
45 install -o root -g root -m 755 slay debian/slay/usr/sbin
46
47
48 # Build architecture-independent files here.
49 binary-indep: build install
50 # We have nothing to do by default.
51
52 # Build architecture-dependent files here.
53 binary-arch: build install
54 # dh_testversion
55 dh_testdir
56 dh_testroot
57 dh_installdebconf
58 dh_installdocs
59 # dh_installexamples
60 # dh_installmenu
61 # dh_installemacsen
62 # dh_installpam
63 # dh_installinit
64 # dh_installcron
65 dh_installman slay.8
66 # dh_installinfo
67 # dh_undocumented
68 dh_installchangelogs
69 # dh_link
70 dh_strip
71 dh_compress
72 dh_fixperms
73 # # You may want to make some executables suid here.
74 # dh_suidregister
75 # dh_makeshlibs
76 dh_installdeb
77 # dh_perl
78 dh_shlibdeps
79 dh_gencontrol
80 dh_md5sums
81 dh_builddeb
82
83 binary: binary-indep binary-arch
84 .PHONY: build clean binary-indep binary-arch binary install configure
0 Template: slay/punish
1 Type: boolean
2 Default: false
3 _Description: Shall slay punish users?
4 Normally slay will punish ordinary users trying to run it by slaying
5 themselves. This is The Right Thing(TM), as users should not mess with
6 administrative commands like slay, but some administrators find it
7 inconvenient. Therefore slay can be configured to punish users or just to
8 display error message.
9
10 Template: slay/butthead
11 Type: boolean
12 Default: false
13 _Description: Shall slay use `Butt-head' mode by default?
14 Slay has two sets of messages: a standard set and an alternative set that
15 is more informal. The alternative set is named after "Butt-head" from
16 MTV's "Beavis & Butt-head" cartoon show, a character who uses the sort of
17 language you'll find in the alternative set. In most cases, the standard
18 set of messages is more appropriate.
+155
-0
slay less more
0 #!/bin/sh
1 #
2 # slay 2.0 - kill all processes belonging to the specified user(s).
3 # originally by Chris Ausbrooks <fish@bucket.ualr.edu>
4 # based on kall (a script of unknown origin)
5 # Heavily rewritten by Pawel Wiecek <coven@debian.org> for Debian
6
7 # Revision history:
8 # 0.99 First attempt.
9 # 1.0 Added Butthead.
10 # 1.1 Added retribution.
11 # 1.2 Added slayee notification.
12 # 2.0 Completely rewritten
13
14 USER=`whoami`
15 SIGNAL=`echo $1 | grep '^\-.*'`
16 ME=`basename $0`
17 COOL='0'
18
19 # this piece of nested ifs is added for Debian package only
20 if [ -f /etc/slay_mode ]
21 then
22 if grep -q mean /etc/slay_mode
23 then
24 MODE='mean'
25 fi
26 if grep -q nice /etc/slay_mode
27 then
28 MODE='nice'
29 fi
30 if [ -z $SLAY_BUTTHEAD ]
31 then
32 if grep -q butthead /etc/slay_mode
33 then
34 SLAY_BUTTHEAD='on'
35 fi
36 if grep -q normal /etc/slay_mode
37 then
38 SLAY_BUTTHEAD='off'
39 fi
40 fi
41 else
42 MODE='mean'
43 if [ -z $SLAY_BUTTHEAD ]
44 then
45 SLAY_BUTTHEAD='off'
46 fi
47 fi
48
49 # Command line handling.
50 if [ "$SIGNAL" != "" ]
51 then
52 shift
53 else
54 SIGNAL="-KILL"
55 fi
56
57 if [ "$SIGNAL" != "-clean" ]
58 then
59 SIGSHOW="$SIGNAL"
60 else
61 SIGSHOW="-TERM + -KILL"
62 fi
63
64 # Help for loosers.
65 if [ "$1" = "" -o "$1" = "--help" ]
66 then
67 echo "usage: $ME [-signal] name [name...]"
68 if [ "$SLAY_BUTTHEAD" = "on" ]
69 then
70 echo " Like, kills people and stuff."
71 echo " With -clean kicks ass forst and then does real pain."
72 else
73 echo " Kills all processes belonging to any of the given names."
74 echo " Use -clean as a signal name to kill with TERM first and then with KILL."
75 fi
76 exit -1
77 fi
78
79 # Misuse trap.
80 if [ "$USER" != "$1" ]
81 then
82 if [ "$USER" != "root" ]
83 then
84 if [ "$MODE" = "mean" ]
85 then
86 $0 -KILL $USER
87 else
88 if [ "$SLAY_BUTTHEAD" = "on" ]
89 then
90 echo "${ME}: Cut it out."
91 else
92 echo "${ME}: Only root gets to do that."
93 fi
94 fi
95 exit 2
96 fi
97 fi
98
99 # Main body.
100 while [ "$1" != "" ]
101 do
102 if [ "$1" = "$USER" ]
103 then
104 if [ "$SLAY_BUTTHEAD" = "on" ]
105 then
106 echo "${ME}: Beavis, don't make me have to smack you."
107 else
108 echo "${ME}: Illegal operation."
109 fi
110 fi
111 COOL="1"
112 if [ "$SLAY_BUTTHEAD" = "on" ]
113 then
114 echo "${ME}: $SIGSHOW is kicking $1's butt!"
115 echo -e "\\n\\n\\nI'm kicking your butt.\\n\\n\\n" | write $1 2>/dev/null
116 else
117 echo "${ME}: Sending $SIGSHOW signal to $1's process(es)..."
118 echo -e "\\n\\n\\nYour current session has been terminated.\\n\\n\\n" | \
119 write $1 2>/dev/null
120 fi
121 if [ "$SIGNAL" = "-clean" ]
122 then
123 su -m $USER -c "kill -TERM -1 2>/dev/null"
124 sleep 10
125 su -m $USER -c "kill -KILL -1 2>/dev/null"
126 else
127 su -m $USER -c "kill $SIGNAL -1 2>/dev/null"
128 fi
129 shift
130 done
131
132 # Error message.
133 if [ $COOL = "0" ]
134 then
135 if [ "$SLAY_BUTTHEAD" = "on" ]
136 then
137 echo "${ME}: How old are you, Beavis?"
138 else
139 echo "${ME}: Nothing done."
140 fi
141 exit 1
142 fi
143
144 # Non-error message.
145 if [ $COOL = "1" ]
146 then
147 if [ "$SLAY_BUTTHEAD" = "on" ]
148 then
149 echo "${ME}: Whoa, I have the power supreme."
150 else
151 echo "${ME}: Done."
152 fi
153 exit 0
154 fi
0 .\"
1 .TH slay 1
2
3 .SH NAME
4 slay \- kill all processes belonging to a user
5
6 .SH SYNOPSIS
7 .B slay
8 .B [-signal]
9 .B name [name...]
10
11 .SH DESCRIPTION
12 .B Slay
13 sends given signal (KILL by default) to all processes belonging to user(s)
14 given on the command line.
15 When called without arguments it displays short help.
16
17 You can use
18 .B -clean
19 as a signal name, in that case a "clean kill" is done, that is processes are
20 first sent
21 .B TERM
22 signal and after 10 seconds those that haven't terminated yet are killed with
23 .B KILL
24
25 .SH OPTIONS
26 There are no options.
27
28 .SH ENVIRONMENT
29 .B SLAY_BUTTHEAD
30 \- setting
31 .B SLAY_BUTTHEAD
32 to
33 .I on
34 puts slay into Butt-head mode (which has different messages than normal mode).
35 Setting it to
36 .I off
37 puts it into normal mode. This environment variable overrides the setting from
38 .I /etc/slay_mode
39
40 .SH FILES
41 .B /etc/slay_mode
42 \- contains keywords describing the mode slay works in, separated by
43 newlines:
44
45 .I mean
46 turns mean mode on. In mean mode attempts to slay people without root
47 priviledges are punished. This is the default.
48
49 .I nice
50 turns mean mode off.
51
52 .I butthead
53 switched slay to Butt-head messages mode.
54
55 .I normal
56 switches slay to normal messages mode. This is the default.
57
58 You can only use one of mean/nice keywords and one of butthead/normal
59 keywords.
60
61 .SH BUGS
62 Unknown. If there are any report them to author and/or package maintainer.
63
64 .SH AUTHOR
65 Slay was written by Chris Ausbrooks <fish@bucket.ualr.edu>.
66
67 This man page was written by Pawel Wiecek <coven@debian.org>.