git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d532184)
Fix "is db labeled test?" in chkselinuxenv script.
Thu, 1 Sep 2011 12:28:26 +0000 (08:28 -0400)
Thu, 1 Sep 2011 12:28:26 +0000 (08:28 -0400)
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.


diff --git a/contrib/sepgsql/chkselinuxenv b/contrib/sepgsql/chkselinuxenv
index 640ec10643e6774a99640e2023398c157698598b..a9425de88e2c6e011dc8bd747fb09fe28091e1c5 100755 (executable)
--- 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"
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /