From bcc2d00c74ea6bb9d7330828bf11f99d1944f92f Mon Sep 17 00:00:00 2001 From: jlam Date: Sat, 19 Oct 2002 21:02:53 +0000 Subject: Alter quoting so that command_args can be set to something like: command_args="> /var/log/pgsql.log" --- databases/postgresql-server/files/pgsql.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'databases/postgresql-server') diff --git a/databases/postgresql-server/files/pgsql.sh b/databases/postgresql-server/files/pgsql.sh index ac1e1276b14..78dcab34eaa 100644 --- a/databases/postgresql-server/files/pgsql.sh +++ b/databases/postgresql-server/files/pgsql.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: pgsql.sh,v 1.15 2002/10/19 19:01:52 jlam Exp $ +# $NetBSD: pgsql.sh,v 1.16 2002/10/19 21:02:53 jlam Exp $ # # PostgreSQL database rc.d control script # @@ -77,7 +77,9 @@ pgsql_initdb() @CHOWN@ ${pgsql_user} ${pgsql_home} @CHGRP@ ${pgsql_group} ${pgsql_home} @CHMOD@ 0750 ${pgsql_home} - @SU@ -m ${pgsql_user} -c "${initdb} ${common_args} ${flags}" + doit_command="${initdb} ${common_args} ${flags}" + doit="@SU@ -m ${pgsql_user} -c '${doit_command}'" + eval $doit fi } @@ -110,7 +112,9 @@ pgsql_doit() restart) @ECHO@ "Restarting ${name}." ;; esac - @SU@ -m ${pgsql_user} -c "${ctl_command} ${action} ${command_args}" + doit_command="${ctl_command} ${action} ${command_args}" + doit="@SU@ -m ${pgsql_user} -c '${doit_command}'" + eval $doit } if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then -- cgit v1.2.3