I think this problem can be fixed with the attached diff.

In short, line 133 of /var/lib/dpkg/info/frontaccounting.postinst should
have $varscript enclosed in quotes.

Note - this bug caused data loss. After my failed install, I manually
created the db config file in /etc/frontaccounting/db_config.php that
was not created by the installer due to this bug and began using the
software.

The next time I ran apt-get install (to install a different package),
the frontaccounting database seems to have been re-created (since the
package was left un-configured due to the error).

jamie


--- frontaccounting.postinst.orig	2011-05-05 13:17:26.000000000 -0400
+++ frontaccounting.postinst	2011-05-05 13:17:41.000000000 -0400
@@ -130,7 +130,7 @@
                         # Expand our config file
                         varscript="s#{DB_USER}#${dbuser}#g;s#{DB_PASS}#${dbpass}#g;s#{DB_HOST}#${dbserver}#g;s#{DB_NAME}#${dbname}#g;s#{DB_PREFIX}#${dbprefix}#g;s#{DB_COMPANY}#${company}#g;";
 			
-                        sed $varscript < $template > $config
+                        sed "$varscript" < $template > $config
                         chown www-data:root $config
                         chmod 640 $config
 						rm $template

Attachment: signature.asc
Description: Digital signature

Reply via email to