accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <>
Subject [ -d "$HADOOP_PREFIX" ] -- does this work with symbolic link? Doesn't seem to for me.
Date Thu, 02 May 2013 02:59:28 GMT
I'm looking at the script:

if [ ! -d "$HADOOP_PREFIX" ]
   echo "$HADOOP_PREFIX is not a directory."
   exit 1

On my system, HADOOP_PREFIX points to a symbolic link and this test is
failing. I'm sure it was working a few weeks ago. Changing the code to:

hadoop_prefix_directory_test=`test -d $HADOOP_PREFIX; echo $?`
if [ hadoop_prefix_directory_test == 1 ]
   echo "HADOOP_PREFIX, which has a value of $HADOOP_PREFIX, is not a
   exit 1

does work on my system. I'm betting user error on my part. Can someone
confirm that the -d syntax works for a symbolic link?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message