in PATH we trust

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-06-17 13:14:57 +02:00
parent 94cdf36439
commit 2cf67e321e
2 changed files with 4 additions and 4 deletions

View file

@ -29,10 +29,10 @@ if [ "$state_should" != "$state_is" ]; then
if [ -f "$__object/parameter/owner" ]; then
owner="-O '$(cat "$__object/parameter/owner")'"
fi
echo "su - postgres -c \"/usr/bin/createdb $owner '$name'\""
echo "su - postgres -c \"createdb $owner '$name'\""
;;
absent)
echo "su - postgres -c \"/usr/bin/dropdb '$name'\""
echo "su - postgres -c \"dropdb '$name'\""
;;
esac
fi

View file

@ -45,10 +45,10 @@ if [ "$state_is" != "$state_should" ]; then
[ "$inherit" = "true" ] && inherit="INHERIT" || inherit="NOINHERIT"
cmd="CREATE ROLE $name WITH $password $login $createdb $createrole $superuser $inherit"
echo "su - postgres -c \"/usr/bin/psql -c \\\"$cmd\\\"\""
echo "su - postgres -c \"psql -c \\\"$cmd\\\"\""
;;
absent)
echo "su - postgres -c \"/usr/bin/dropuser \\\"$name\\\"\""
echo "su - postgres -c \"dropuser \\\"$name\\\"\""
;;
esac
fi