[Pkg-cracklib-commits] r74 - cracklib2/trunk/debian

jandd-guest at alioth.debian.org jandd-guest at alioth.debian.org
Wed Dec 31 14:04:22 UTC 2008


Author: jandd-guest
Date: 2008-12-31 14:04:21 +0000 (Wed, 31 Dec 2008)
New Revision: 74

Added:
   cracklib2/trunk/debian/cracklib-runtime.triggers
Modified:
   cracklib2/trunk/debian/changelog
   cracklib2/trunk/debian/cracklib-runtime.postinst
Log:
add triggers support for cracklib runtime

Modified: cracklib2/trunk/debian/changelog
===================================================================
--- cracklib2/trunk/debian/changelog	2008-12-09 21:27:02 UTC (rev 73)
+++ cracklib2/trunk/debian/changelog	2008-12-31 14:04:21 UTC (rev 74)
@@ -1,3 +1,12 @@
+cracklib2 (2.8.13-5) unstable; urgency=low
+
+  * add debian/cracklib-runtime.triggers to get triggered by installation
+    of dictionary files
+  * add trigger support to debian/cracklib-runtime.postinst and change
+    code structure to avoid duplication
+
+ -- Jan Dittberner <jan at dittberner.info>  Wed, 31 Dec 2008 15:03:29 +0100
+
 cracklib2 (2.8.13-4) unstable; urgency=low
 
   * debian/update-cracklib: add a check whether all installed

Modified: cracklib2/trunk/debian/cracklib-runtime.postinst
===================================================================
--- cracklib2/trunk/debian/cracklib-runtime.postinst	2008-12-09 21:27:02 UTC (rev 73)
+++ cracklib2/trunk/debian/cracklib-runtime.postinst	2008-12-31 14:04:21 UTC (rev 74)
@@ -2,15 +2,26 @@
 
 set -e
 
-if [ "$1" = "configure" -a -r /etc/cracklib/cracklib.conf ]; then
-    update-cracklib > /dev/null
+run_update_cracklib () {
+    if [ -r /etc/cracklib/cracklib.conf ]; then
+        update-cracklib > /dev/null
+    fi
+}
 
-    # /etc/cron.daily/cracklib -> cracklib-runtime transition
-    if dpkg --compare-versions "$2" le "2.7-17"; then
-	if [ -e /etc/cron.daily/cracklib ]; then
-	    rm -f /etc/cron.daily/cracklib-runtime
-	    mv /etc/cron.daily/cracklib /etc/cron.daily/cracklib-runtime
-	fi
+if [ "$1" = "triggered" ]; then
+    run_update_cracklib
+    exit 0
+fi
+
+[ "$1" = "configure" ] || exit 0
+
+run_update_cracklib
+
+# /etc/cron.daily/cracklib -> cracklib-runtime transition
+if dpkg --compare-versions "$2" le "2.7-17"; then
+    if [ -e /etc/cron.daily/cracklib ]; then
+        rm -f /etc/cron.daily/cracklib-runtime
+        mv /etc/cron.daily/cracklib /etc/cron.daily/cracklib-runtime
     fi
 fi
 

Added: cracklib2/trunk/debian/cracklib-runtime.triggers
===================================================================
--- cracklib2/trunk/debian/cracklib-runtime.triggers	                        (rev 0)
+++ cracklib2/trunk/debian/cracklib-runtime.triggers	2008-12-31 14:04:21 UTC (rev 74)
@@ -0,0 +1,5 @@
+# These are the directories listed in the default /etc/cracklib/cracklib.conf
+interest /usr/share/dict
+interest /usr/dict
+interest /usr/local/share/dict
+interest /usr/local/dict


Property changes on: cracklib2/trunk/debian/cracklib-runtime.triggers
___________________________________________________________________
Name: svn:mergeinfo
   + 




More information about the Pkg-cracklib-commits mailing list