From 72f12784eafc5ecfc9f8531485154d4138ad1e0e Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Dec 2009 02:55:25 +0100 Subject: [PATCH] Add user handling, support for wireshark-lua + debian/anytun.default; Update changelog; Bump Standards-Version; Add adduser to Depends --- debian/anytun.default | 10 ++++++++++ debian/changelog | 4 ++-- debian/control | 4 ++-- debian/postinst | 4 ++++ debian/postrm | 7 +++++++ debian/rules | 4 +++- 6 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 debian/anytun.default diff --git a/debian/anytun.default b/debian/anytun.default new file mode 100644 index 0000000..7a2bce8 --- /dev/null +++ b/debian/anytun.default @@ -0,0 +1,10 @@ +# Defaults for anytun initscript +# sourced by /etc/init.d/anytun + +# Note: chroot is tricky and not reliable yet. Use it only +# if you know what you're doing. +#CHROOTDIR='/var/run/anytun' +#DAEMONOPTS="--chroot $CHROOTDIR --username nobody" + +# Additional options that are passed to the Daemon. +DAEMONOPTS="--username anytun" diff --git a/debian/changelog b/debian/changelog index 91e7048..d1f6ff7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -anytun (0.3-1) unstable; urgency=low +anytun (0.3.2-1) unstable; urgency=low * Initial release. [Closes: #531077] - -- Michael Prokop Fri, 29 May 2009 21:31:21 +0200 + -- Michael Prokop Mon, 14 Dec 2009 02:08:25 +0100 diff --git a/debian/control b/debian/control index 7471917..d201ef1 100644 --- a/debian/control +++ b/debian/control @@ -6,11 +6,11 @@ Build-Depends: debhelper (>= 5), asciidoc, autotools-dev, docbook-xsl, libgcrypt Homepage: http://www.anytun.org/ Vcs-git: git://git.grml.org/anytun.git Vcs-Browser: http://git.grml.org/?p=anytun.git -Standards-Version: 3.8.1 +Standards-Version: 3.8.3 Package: anytun Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser Suggests: quagga Description: secure anycast tunneling protocol Anytun is an implementation of the secure anycast tunneling protocol. It diff --git a/debian/postinst b/debian/postinst index 6fe7cc6..9896643 100755 --- a/debian/postinst +++ b/debian/postinst @@ -7,4 +7,8 @@ if [ -x "/etc/init.d/anytun" ]; then update-rc.d anytun defaults >/dev/null fi +if [ "$1" = "configure" ]; then + adduser --quiet --system --group --no-create-home --home /var/run/anytun anytun +fi + #DEBHELPER# diff --git a/debian/postrm b/debian/postrm index cbb8c6d..227ebdf 100755 --- a/debian/postrm +++ b/debian/postrm @@ -5,6 +5,13 @@ set -e if [ "$1" = "purge" ] ; then update-rc.d anytun remove >/dev/null || exit $? + + if [ -x "$(command -v deluser)" -a -x "$(command -v delgroup)" ]; then + deluser --quiet --system anytun || true + delgroup --quiet --system anytun || true + else + echo "Not removing anytun user and group: adduser package not found." >&2 + fi fi #DEBHELPER# diff --git a/debian/rules b/debian/rules index d555e24..cfc7167 100755 --- a/debian/rules +++ b/debian/rules @@ -46,7 +46,7 @@ install: build dh_testdir dh_testroot dh_clean -k - dh_installdirs usr/bin usr/sbin usr/share/man/man8 etc/anytun etc/init.d/ + dh_installdirs usr/bin usr/sbin usr/share/man/man8 etc/anytun etc/init.d/ usr/share/anytun # Add here commands to install the package into debian/anytun. install $(CURDIR)/src/anytun $(CURDIR)/debian/anytun/usr/sbin/ @@ -58,6 +58,7 @@ install: build cp $(CURDIR)/src/man/*.8 $(CURDIR)/debian/anytun/usr/share/man/man8 install $(CURDIR)/etc/init.d/anytun $(CURDIR)/debian/anytun/etc/init.d/ cp -a $(CURDIR)/etc/anytun $(CURDIR)/debian/anytun/etc/ + cp -a $(CURDIR)/wireshark-lua $(CURDIR)/debian/anytun/usr/share/anytun/ # Build architecture-independent files here. binary-indep: build install @@ -70,6 +71,7 @@ binary-arch: build install dh_installchangelogs dh_installdocs dh_installexamples + dh_installinit dh_installman dh_link dh_strip -- 2.1.4