[Pkg-sql-ledger-commit] r135 - trunk/debian

pkg-sql-ledger-commit-owner at lists.alioth.debian.org pkg-sql-ledger-commit-owner at lists.alioth.debian.org
Sun Sep 3 20:53:35 UTC 2006


Author: hertzog
Date: 2006-09-03 20:53:34 +0000 (Sun, 03 Sep 2006)
New Revision: 135

Modified:
   trunk/debian/changelog
   trunk/debian/postinst
Log:
New upstream release. Rework the postinst a bit.


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-09-03 20:42:40 UTC (rev 134)
+++ trunk/debian/changelog	2006-09-03 20:53:34 UTC (rev 135)
@@ -3,6 +3,9 @@
   * New upstream release:
     - fixed problem with temporary id assignment when adding customers,
     vendors and employees.
+  * Make the debian/postinst a bit less dumb. Do not reactivate the
+    configuration if the admin deactivated it, instead I only create a default
+    configuration if there's no file yet.
 
  -- Raphael Hertzog <hertzog at debian.org>  Sun,  3 Sep 2006 22:37:16 +0200
 

Modified: trunk/debian/postinst
===================================================================
--- trunk/debian/postinst	2006-09-03 20:42:40 UTC (rev 134)
+++ trunk/debian/postinst	2006-09-03 20:53:34 UTC (rev 135)
@@ -21,24 +21,20 @@
 # <URL:http://www.opal.dhs.org/involved/debian/apache/>, before it
 # is enabled.
 
-if [ -d /etc/apache/conf.d ] ; then # Debian/Sarge or later
-    echo "info: Detected apache for Debian/Sarge or later"
-    httpdconf=/etc/apache/conf.d/sql-ledger.conf
-else
-    echo "info: Detected apache for Debian/Woody or earlier"
-    httpdconf=/etc/apache/httpd.conf
-fi
+# Until it gets rewritten I simplify it because the current scheme
+# always reactivate sql-ledger for the default host (even if the admin
+# commented it out)
 
-includeline="Include /etc/sql-ledger/sql-ledger-httpd.conf"
-
-if test -e $httpdconf && grep -q "^$includeline" $httpdconf ; then
-    echo "info: SQL-Ledger is already enabled in $httpdconf"
-else
-    echo "$includeline" >> $httpdconf
-    echo "info: Content of $httpdconf is updated."
-    echo "info: Please restart apache for this change to take effect."
-    echo "info: Remember that there might be no admin password set at"
-    echo "info: the moment, and the installation is open for everyone."
+if [ -d /etc/apache/conf.d ] ; then
+    if [ ! -e /etc/apache/conf.d/sql-ledger.conf ]; then
+	echo "INFO: A default /etc/sql-ledger/sql-ledger-httpd.conf has been setup."
+	cat <<END >/etc/apache/conf.d/sql-ledger.conf
+# Uncomment the following line to deactivate sql-ledger on the default
+# apache configuration, you'll have to include that line of configuration
+# for each virtual host where you want to activate it
+Include /etc/sql-ledger/sql-ledger-httpd.conf
+END
+    fi
 fi
 
 #DEBHELPER#




More information about the Pkg-sql-ledger-commit mailing list