From 2d2cd458e04c0036d10f0fc689a2f4d6e7d7a9f7 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 14 Jun 2011 15:07:10 +0200 Subject: [PATCH] =?utf8?q?Falsche=20sed-Anweisungen=20matchen=20nicht;=20k?= =?utf8?q?eine=20tempor=C3=A4ren=20Dateien=20mit=20vorhersagbarem=20Namen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- DEBIAN/DEBIAN/postinst | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/DEBIAN/DEBIAN/postinst b/DEBIAN/DEBIAN/postinst index c0fd4f8fb..06295233a 100755 --- a/DEBIAN/DEBIAN/postinst +++ b/DEBIAN/DEBIAN/postinst @@ -77,16 +77,10 @@ config_postgresql_sql_routines() { set_lx_office_erp_web_admin_password() { - db_get lx-office-erp/admin-password ADMINPASSWORD="$RET" - cat /etc/lx-office-erp/lx_office.conf | \ - sed --expression "s/{admin_password} = /{admin_password} = $ADMINPASSWORD/g" \ - > /tmp/1.txt - - mv /tmp/1.txt /etc/lx-office-erp/lx_office.conf - + sed --in-place --expression "s/^admin_password.*=.*/admin_password = $ADMINPASSWORD/" /etc/lx-office-erp/lx_office.conf } @@ -94,14 +88,8 @@ set_lx_office_erp_authentication_db_user_password() { db_get lx-office-erp/lx-office-erp-user-postgresql-password PASSWORD="$RET" - cat /etc/lx-office-erp/lx_office.conf | \ - sed --expression "s/'password' = /'password' = $PASSWORD/g" \ - > /tmp/1.txt - - cat /tmp/1.txt | \ - sed --expression "s/^user = postgres/user = lxoffice/g" \ - > /etc/lx-office-erp/lx_office.conf - + sed --in-place --expression "s/^password.*=.*/password = $PASSWORD/" /etc/lx-office-erp/lx_office.conf + sed --in-place --expression "s/^user.*=.*postgres/user = lxoffice/g" /etc/lx-office-erp/lx_office.conf } -- 2.20.1