diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-09-01 08:28:26 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-09-01 08:28:26 -0400 |
commit | 3d14bd2563cc527f250eed8d6d83e3ff62318675 (patch) | |
tree | da57b9f152affb56609ed79261c06a4c3cf64534 | |
parent | d5321842528dfb73f8254a48556b4adb1b6d1c5a (diff) | |
download | postgresql-3d14bd2563cc527f250eed8d6d83e3ff62318675.tar.gz |
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.
-rwxr-xr-x | contrib/sepgsql/chkselinuxenv | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/sepgsql/chkselinuxenv b/contrib/sepgsql/chkselinuxenv index 640ec10643..a9425de88e 100755 --- a/contrib/sepgsql/chkselinuxenv +++ b/contrib/sepgsql/chkselinuxenv @@ -210,7 +210,7 @@ echo "ok" # template1 database must be labeled echo -n "checking for labels in template1 ... " 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 "" echo "In order to regression test sepgsql, initial labels must be assigned" |