Commit 3d14bd25 authored by Robert Haas's avatar Robert Haas

Fix "is db labeled test?" in chkselinuxenv script.

Don't test whether the number of labels is numerically equal to zero;
count(*) isn't going return zero anyway, and the current coding blows
up if it returns an empty string or an error.
parent d5321842
...@@ -210,7 +210,7 @@ echo "ok" ...@@ -210,7 +210,7 @@ echo "ok"
# template1 database must be labeled # template1 database must be labeled
echo -n "checking for labels in template1 ... " echo -n "checking for labels in template1 ... "
NUM=`${CMD_PSQL} template1 -Atc 'SELECT count(*) FROM pg_catalog.pg_seclabel' 2>/dev/null` NUM=`${CMD_PSQL} template1 -Atc 'SELECT count(*) FROM pg_catalog.pg_seclabel' 2>/dev/null`
if [ -z "${NUM}" -o "$NUM" -eq 0 ]; then if [ -z "${NUM}" ]; then
echo "failed" echo "failed"
echo "" echo ""
echo "In order to regression test sepgsql, initial labels must be assigned" echo "In order to regression test sepgsql, initial labels must be assigned"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment