[Pkg-cyrus-sasl2-commits] r176 - in /cyrus-sasl-2.1/trunk/debian: changelog sasl2-bin.postinst

fabbe at users.alioth.debian.org fabbe at users.alioth.debian.org
Fri Dec 8 08:33:34 CET 2006


Author: fabbe
Date: Fri Dec  8 08:33:33 2006
New Revision: 176

URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/?sc=1&rev=176
Log:
Create default statoverride entries and sasldb file in sasl2-bin postinst.

Added:
    cyrus-sasl-2.1/trunk/debian/sasl2-bin.postinst
Modified:
    cyrus-sasl-2.1/trunk/debian/changelog

Modified: cyrus-sasl-2.1/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/changelog?rev=176&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/changelog (original)
+++ cyrus-sasl-2.1/trunk/debian/changelog Fri Dec  8 08:33:33 2006
@@ -2,7 +2,12 @@
 
   * NOT RELEASED YET
 
- -- Fabian Fagerholm <fabbe at debian.org>  Tue,  5 Dec 2006 23:09:04 +0200
+  [ Fabian Fagerholm ]
+  * debian/sasl2-bin.postinst: create default statoverride entries for the
+    saslauthd run directory and sasldb file, and create an empty sasldb file
+    unless one already exists. (Closes: #401348)
+
+ -- Fabian Fagerholm <fabbe at debian.org>  Fri,  8 Dec 2006 09:29:51 +0200
 
 cyrus-sasl2 (2.1.22.dfsg1-6) unstable; urgency=medium
 

Added: cyrus-sasl-2.1/trunk/debian/sasl2-bin.postinst
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/sasl2-bin.postinst?rev=176&op=file
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/sasl2-bin.postinst (added)
+++ cyrus-sasl-2.1/trunk/debian/sasl2-bin.postinst Fri Dec  8 08:33:33 2006
@@ -1,0 +1,47 @@
+#!/bin/sh
+# postinst script for sasl2-bin
+# Copyright (c) 2006 Fabian Fagerholm
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+FALLBACK_RUN_DIR=/var/run/saslauthd
+SASLDB_FILE=/etc/sasldb2
+
+case "$1" in
+	configure)
+		# Create a statoverride for the saslauthd run directory,
+		# unless one already exists
+		if ! dpkg-statoverride --list $FALLBACK_RUN_DIR >/dev/null 2>&1; then
+			dpkg-statoverride --update --add root sasl 710 /var/run/saslauthd
+		fi
+
+		# Create an empty sasldb file, unless one already exists
+		if [ ! -f $SASLDB_FILE ]; then
+			echo '!' | saslpasswd2 -c 'no:such:user'
+			saslpasswd2 -d 'no:such:user'
+		fi
+
+		# Create a statoverride for the sasldb file, unless one already exists
+		if ! dpkg-statoverride --list $SASLDB_FILE >/dev/null 2>&1; then
+			dpkg-statoverride --update --add root sasl 660 $SASLDB_FILE
+		fi
+
+		;;
+
+	abort-upgrade|abort-remove|abort-deconfigure)
+		;;
+
+	*)
+		echo "postinst called with unknown argument $1" >&2
+		exit 0
+		;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0




More information about the Pkg-cyrus-sasl2-commits mailing list