Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #34 from cookie33/master
Browse files Browse the repository at this point in the history
add update of extra parameter in local.re
  • Loading branch information
ccacciari committed Oct 27, 2015
2 parents 60f827d + 9049f86 commit 6a51cbc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions packaging/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,33 @@ update_log_manager_conf() {
return $STATUS
}

update_get_metadata_parameters() {

METADATA_MANAGER_CONF=$B2SAFE_PACKAGE_DIR/conf/metadataManager.conf
B2SAFE_LOCALFILE=$B2SAFE_PACKAGE_DIR/rulebase/local.re
if [ ! -e ${B2SAFE_LOCALFILE}.org.${DATE_TODAY} ]
then
cp $B2SAFE_LOCALFILE ${B2SAFE_LOCALFILE}.org.${DATE_TODAY}
fi
cat $B2SAFE_LOCALFILE | \
awk -F= -v METADATA_MANAGER_CONF=$METADATA_MANAGER_CONF '{
if ( $1 ~ /^ +\*metaConfPath/ ) {
$1=$1"=\""METADATA_MANAGER_CONF"\";"
$2=""
} print $0
}' > $B2SAFE_LOCALFILE.new
if [ $? -eq 0 ]
then
mv $B2SAFE_LOCALFILE.new $B2SAFE_LOCALFILE
else
echo "ERROR: updating $B2SAFE_LOCALFILE failed!"
STATUS=1
fi

return $STATUS
}



########################
# main program
Expand Down Expand Up @@ -569,6 +596,16 @@ then
update_log_manager_conf
fi

#
# update the "getMetaParameters" rule in "/opt/eudat/b2safe/rulebase/local.re"
#
if [ $? -eq 0 ]
then
echo "update_metadata_manager"
update_get_metadata_parameters
fi


#
# create a shared space in all zones as configured in the eudat.re rulebase getSharedCollection function.
#
Expand Down

0 comments on commit 6a51cbc

Please sign in to comment.