tags 560377 + patch thanks -- http://rjy.org.uk/
>From 4d9038b2297615151b617471c62d40f959783e01 Mon Sep 17 00:00:00 2001 From: RjY <r...@users.sourceforge.net> Date: Wed, 23 Feb 2011 17:35:14 +0000 Subject: [PATCH] debian/nmap.{postinst,prerm}: install ncat as netcat alternative
Fix #560377. Install at priority 40, slightly less than netcat-openbsd and netcat6. postinst/prerm code more or less copied out of netcat6. Signed-off-by: RjY <r...@users.sourceforge.net> --- debian/nmap.postinst | 14 ++++++++++++++ debian/nmap.prerm | 8 ++++++++ 2 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 debian/nmap.postinst create mode 100644 debian/nmap.prerm diff --git a/debian/nmap.postinst b/debian/nmap.postinst new file mode 100644 index 0000000..9bbb05e --- /dev/null +++ b/debian/nmap.postinst @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + update-alternatives \ + --install /bin/nc nc /usr/bin/ncat 40 \ + --slave /bin/netcat netcat /usr/bin/ncat \ + --slave /usr/share/man/man1/nc.1.gz nc.1.gz \ + /usr/share/man/man1/ncat.1.gz \ + --slave /usr/share/man/man1/netcat.1.gz netcat.1.gz \ + /usr/share/man/man1/ncat.1.gz +fi + +#DEBHELPER# diff --git a/debian/nmap.prerm b/debian/nmap.prerm new file mode 100644 index 0000000..58a15ee --- /dev/null +++ b/debian/nmap.prerm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = "remove" ]; then + update-alternatives --remove nc /usr/bin/ncat +fi + +#DEBHELPER# -- 1.7.4.1