Skip to content

Commit

Permalink
Check for cvmfs_config path
Browse files Browse the repository at this point in the history
In MacOS X Sierra, cvmfs_config is installed in /usr/local/bin and not in /usr/bin. Get the full path using 'command -v cvmfs_config'.
  • Loading branch information
crosset authored Jan 19, 2018
1 parent b8ea9e6 commit d559ea6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
# This script can be run multiple times.
# More information: https://github.com/airnandez/lsst-cvmfs

CVMFS_CONFIG=$(command -v cvmfs_config)

# We must run as 'root'
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi

# Run CernVM FS configuration
if [ ! -x /usr/bin/cvmfs_config ]; then
if [ ! -x $CVMFS_CONFIG ]; then
echo "Could not find CernVM FS configuration tool"
exit 1
fi
/usr/bin/cvmfs_config setup
$CVMFS_CONFIG setup
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down Expand Up @@ -52,7 +54,7 @@ if [ "$thisOS" == "Linux" ]; then
mkdir -p /etc/cvmfs/domain.d

# Use 'cvmfs_config' to check the configuration
result=`/usr/bin/cvmfs_config chksetup`
result=`$CVMFS_CONFIG chksetup`
if [ "$result" != "OK" ]; then
echo "There was an error checking your CernVM FS configuration:"
echo $result
Expand Down

0 comments on commit d559ea6

Please sign in to comment.