Unverified Commit d559ea6b authored by crosset's avatar crosset Committed by GitHub
Browse files

Check for cvmfs_config path

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'.
parent b8ea9e66
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
# This script can be run multiple times. # This script can be run multiple times.
# More information: https://github.com/airnandez/lsst-cvmfs # More information: https://github.com/airnandez/lsst-cvmfs
CVMFS_CONFIG=$(command -v cvmfs_config)
# We must run as 'root' # We must run as 'root'
if [ "$EUID" -ne 0 ]; then if [ "$EUID" -ne 0 ]; then
echo "Please run as root" echo "Please run as root"
...@@ -12,11 +14,11 @@ if [ "$EUID" -ne 0 ]; then ...@@ -12,11 +14,11 @@ if [ "$EUID" -ne 0 ]; then
fi fi
# Run CernVM FS configuration # Run CernVM FS configuration
if [ ! -x /usr/bin/cvmfs_config ]; then if [ ! -x $CVMFS_CONFIG ]; then
echo "Could not find CernVM FS configuration tool" echo "Could not find CernVM FS configuration tool"
exit 1 exit 1
fi fi
/usr/bin/cvmfs_config setup $CVMFS_CONFIG setup
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
...@@ -52,7 +54,7 @@ if [ "$thisOS" == "Linux" ]; then ...@@ -52,7 +54,7 @@ if [ "$thisOS" == "Linux" ]; then
mkdir -p /etc/cvmfs/domain.d mkdir -p /etc/cvmfs/domain.d
# Use 'cvmfs_config' to check the configuration # Use 'cvmfs_config' to check the configuration
result=`/usr/bin/cvmfs_config chksetup` result=`$CVMFS_CONFIG chksetup`
if [ "$result" != "OK" ]; then if [ "$result" != "OK" ]; then
echo "There was an error checking your CernVM FS configuration:" echo "There was an error checking your CernVM FS configuration:"
echo $result echo $result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment