diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-05-24 00:06:15 +0100 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-06-05 02:40:03 +0100 |
commit | 4a915274f2ef8986a4e86be38991e8e2f6164e6b (patch) | |
tree | 2e8fb2abe5f41147c4fc1638d3c1c4e569182dea | |
parent | 5e32cdf40e509285ca38e630fd476d5da1350f48 (diff) | |
download | nyancat-4a915274f2ef8986a4e86be38991e8e2f6164e6b.tar.gz |
Re-enable reconf-inetd
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 5 | ||||
-rw-r--r-- | debian/nyancat-server.7 | 32 | ||||
-rw-r--r-- | debian/nyancat-server.install | 2 | ||||
-rw-r--r-- | debian/nyancat-server.links | 2 | ||||
-rw-r--r-- | debian/nyancat-server.manpages | 1 | ||||
-rw-r--r-- | debian/nyancat-server.postinst | 25 | ||||
-rw-r--r-- | debian/nyancat-server.postrm | 26 | ||||
-rw-r--r-- | debian/nyancat.1 | 4 | ||||
-rw-r--r-- | debian/reconf-inetd/nyancat-server.tcp | 9 | ||||
-rw-r--r-- | debian/reconf-inetd/nyancat-server.tcp6 | 9 |
11 files changed, 56 insertions, 66 deletions
diff --git a/debian/changelog b/debian/changelog index 7b682e2..1be4a8f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,13 @@ nyancat (0.1+git20120401.5a88b86-2) UNRELEASED; urgency=low * Switch to debhelper v9 + * Use reconf-inetd to provide nyancat-server configs + - Provide nyancat-server as symlink to nyancat + - Add versioned dependency on nyancat + - Remove now redundant nyancat-server manpage and postrm + - Update package description to reflect this switch + - Update postinst to aid transition to reconf-inetd + - Add IPv6 support -- Jonathan McCrohan <jmccrohan@gmail.com> Sun, 20 May 2012 01:33:26 +0100 diff --git a/debian/control b/debian/control index 13a8d21..217ff43 100644 --- a/debian/control +++ b/debian/control @@ -17,9 +17,12 @@ Description: Animated terminal Nyancat Package: nyancat-server Architecture: all -Depends: nyancat, openbsd-inetd | inet-superserver, ${misc:Depends} +Depends: nyancat (>= ${source:Version}), openbsd-inetd | inet-superserver, reconf-inetd, ${misc:Depends} Conflicts: telnetd Description: Animated terminal Nyancat server configurations nyancat-server contains the configuations required to quickly set up a nyancat server. This allows the animated poptart cat to be served to many users via telnet. + . + Installing this package will automatically configure and activate a nyancat + telnet server. diff --git a/debian/nyancat-server.7 b/debian/nyancat-server.7 deleted file mode 100644 index 26fc817..0000000 --- a/debian/nyancat-server.7 +++ /dev/null @@ -1,32 +0,0 @@ -.TH NYANCAT-SERVER 7 "April, 2012" -.SH NAME -nyancat-server \- terminal-based Pop Tart Cat animation server -.SH DESCRIPTION -The -.B nyancat-server -package contains the inetd configuations required to serve nyancat via telnet. -.PP -For security and bandwidth reasons, the inetd server is disabled by default. -The server must be enabled manually using the inetd options below. -.SH OPTIONS -.TP -.B update-inetd --enable '.*/usr/bin/nyancat' -Enable the nyancat-server after the next restart. -.TP -.B update-inetd --disable '.*/usr/bin/nyancat' -Disable the nyancat-server after the next restart. -.SH SEE ALSO -.BR nyancat (1), -.BR inetd (8). -.SH HOMEPAGE -.PP -.B Homepage: -http://miku.acm.uiuc.edu/ -.PP -.B Repository: -https://github.com/klange/nyancat -.SH AUTHOR -nyancat was written by Kevin Lange. -.PP -This manual page was written by Jonathan McCrohan <jmccrohan@gmail.com>, -for the Debian project (and may be used by others). diff --git a/debian/nyancat-server.install b/debian/nyancat-server.install new file mode 100644 index 0000000..afd8833 --- /dev/null +++ b/debian/nyancat-server.install @@ -0,0 +1,2 @@ +debian/reconf-inetd/nyancat-server.tcp usr/share/reconf-inetd/ +debian/reconf-inetd/nyancat-server.tcp6 usr/share/reconf-inetd/ diff --git a/debian/nyancat-server.links b/debian/nyancat-server.links new file mode 100644 index 0000000..f4b78e2 --- /dev/null +++ b/debian/nyancat-server.links @@ -0,0 +1,2 @@ +usr/bin/nyancat usr/bin/nyancat-server +/usr/share/man/man1/nyancat.1.gz /usr/share/man/man1/nyancat-server.1.gz diff --git a/debian/nyancat-server.manpages b/debian/nyancat-server.manpages deleted file mode 100644 index 5bdf1d7..0000000 --- a/debian/nyancat-server.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/nyancat-server.7 diff --git a/debian/nyancat-server.postinst b/debian/nyancat-server.postinst index c723125..757eea5 100644 --- a/debian/nyancat-server.postinst +++ b/debian/nyancat-server.postinst @@ -2,8 +2,27 @@ set -e -# Set up nyancat -update-inetd --group OTHER --add \ - '#<off># telnet\t\tstream\ttcp\tnowait\tnobody\t/usr/bin/nyancat\tnyancat -t' +OLD_NYANCAT_ENTRY="telnet stream tcp nowait nobody /usr/bin/nyancat nyancat -t" +RELEASE="1.0+git20120523.99dc310-1" + +case "$1" in + configure) + # if upgrading from previous non reconf-inetd version + if dpkg --compare-versions "$2" lt-nl "$RELEASE"; then + # remove previous update-inetd entry if unmodified + if fgrep -qx "#<off># $OLD_NYANCAT_ENTRY" /etc/inetd.conf || \ + fgrep -qx "$OLD_NYANCAT_ENTRY" /etc/inetd.conf; then + if [ -x /usr/sbin/update-inetd ]; then + # remove nyancat reconf-inetd entries + update-inetd --multi --pattern nyancat --remove telnet || true + if [ -x /usr/sbin/reconf-inetd ]; then + # add the nyancat-server entries back again + reconf-inetd || true + fi + fi + fi + fi + ;; +esac #DEBHELPER# diff --git a/debian/nyancat-server.postrm b/debian/nyancat-server.postrm deleted file mode 100644 index 9b2af53..0000000 --- a/debian/nyancat-server.postrm +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - purge) - if [ -x /usr/sbin/update-inetd ]; then - update-inetd --remove nyancat - fi - ;; - remove) - if [ -x /usr/sbin/update-inetd ]; then - update-inetd --disable nyancat - fi - ;; - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - *) - echo "$0: unknown action \"$1\"" - exit 0 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/nyancat.1 b/debian/nyancat.1 index 671fe4c..af289f9 100644 --- a/debian/nyancat.1 +++ b/debian/nyancat.1 @@ -1,4 +1,4 @@ -.TH NYANCAT 1 "April, 2012" +.TH NYANCAT 1 "May, 2012" .SH NAME nyancat \- terminal-based Pop Tart Cat animation .SH SYNOPSIS @@ -50,8 +50,6 @@ Crop the animation to the given height. .TP .B \-h, --help Show help message and exit. -.SH SEE ALSO -.BR nyancat-server (7). .SH HOMEPAGE .PP .B Homepage: diff --git a/debian/reconf-inetd/nyancat-server.tcp b/debian/reconf-inetd/nyancat-server.tcp new file mode 100644 index 0000000..df12cc2 --- /dev/null +++ b/debian/reconf-inetd/nyancat-server.tcp @@ -0,0 +1,9 @@ +service telnet +{ + socket_type = stream + protocol = tcp + wait = no + user = nobody + server = /usr/bin/nyancat-server + server_args = nyancat -t +} diff --git a/debian/reconf-inetd/nyancat-server.tcp6 b/debian/reconf-inetd/nyancat-server.tcp6 new file mode 100644 index 0000000..a7285b5 --- /dev/null +++ b/debian/reconf-inetd/nyancat-server.tcp6 @@ -0,0 +1,9 @@ +service telnet +{ + socket_type = stream + protocol = tcp6 + wait = no + user = nobody + server = /usr/bin/nyancat-server + server_args = nyancat -t +} |