From: Moritz Bunkus Date: Tue, 14 Jun 2011 13:07:10 +0000 (+0200) Subject: Falsche sed-Anweisungen matchen nicht; keine temporären Dateien mit vorhersagbarem... X-Git-Tag: release-2.6.3~21 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2d2cd458e04c0036d10f0fc689a2f4d6e7d7a9f7;p=kivitendo-erp.git Falsche sed-Anweisungen matchen nicht; keine temporären Dateien mit vorhersagbarem Namen --- 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 }