Add user handling, support for wireshark-lua + debian/anytun.default; Update changelo...
authorMichael Prokop <mika@debian.org>
Mon, 14 Dec 2009 01:55:25 +0000 (02:55 +0100)
committerMichael Prokop <mika@debian.org>
Mon, 14 Dec 2009 01:55:34 +0000 (02:55 +0100)
debian/anytun.default [new file with mode: 0644]
debian/changelog
debian/control
debian/postinst
debian/postrm
debian/rules

diff --git a/debian/anytun.default b/debian/anytun.default
new file mode 100644 (file)
index 0000000..7a2bce8
--- /dev/null
@@ -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"
index 91e7048..d1f6ff7 100644 (file)
@@ -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 <mika@debian.org>  Fri, 29 May 2009 21:31:21 +0200
+ -- Michael Prokop <mika@debian.org>  Mon, 14 Dec 2009 02:08:25 +0100
 
index 7471917..d201ef1 100644 (file)
@@ -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
index 6fe7cc6..9896643 100755 (executable)
@@ -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#
index cbb8c6d..227ebdf 100755 (executable)
@@ -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#
index d555e24..cfc7167 100755 (executable)
@@ -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