# This approach ensures all non-NFS shares are modified and runs quickly.
set +e # chown returns non-zero on various failures we can ignore
- fstype=$(stat --file-system -c %T /openils/var/data/offline)
+ fstype=""
+ if [ -d /openils/var/data/offline ]; then
+ fstype=$(stat --file-system -c %T /openils/var/data/offline)
+ fi
if [ "$fstype" != "nfs" ]; then
# if the offline directory is not an NFS share, assume this
# server has no NFS shares under /openils.
announce "Assuming no NFS shares present"
- sudo chown -R opensrf:opensf /openils 2> /dev/null
+ sudo chown -R opensrf:opensrf /openils 2> /dev/null
return
fi
# Put client server files under the build-id specific directory
# so we can track each build individually. A symlink from the
# series (if set) to the latest build is set later.
- sudo make STAFF_CLIENT_STAMP_ID="$CLIENT_BUILD_ID" \
- STAFF_CLIENT_BUILD_ID="$CLIENT_BUILD_ID" \
- STAFF_CLIENT_VERSION="$CLIENT_BUILD_ID" install > /dev/null
+ sudo make STAFF_CLIENT_STAMP_ID="$CLIENT_BUILD_ID" install > /dev/null
# recover ownership of repo files after sudo/install
sudo chown -R $OWNER:$OWNER $EVERGREEN_BASE