diff --git a/sysdep/pal-distro.sh b/sysdep/pal-distro.sh
index 2245ea3f4f483db3ee4d36e420ac1314085a9ee9..913e7f6e88b2f50ac683a75d2dcfeac5de356970 100755
--- a/sysdep/pal-distro.sh
+++ b/sysdep/pal-distro.sh
@@ -17,14 +17,14 @@
 #
 #                                            Anthony Mallet on Fri Sep  9 2011
 #
-if test -f /opt/pal/erbium; then
+if test -d /opt/pal/erbium; then
   echo "palerbium"
   exit 0
 fi
-if test -f /opt/pal/dubnium; then
+if test -d /opt/pal/dubnium; then
   echo "paldubnium"
   exit 0
 fi
-echo "Not found"
+echo "NotFound"
 exit 0