diff --git a/src/image_mad/remotes/fs/fsrc b/src/image_mad/remotes/fs/fsrc new file mode 100644 index 0000000000..b716314538 --- /dev/null +++ b/src/image_mad/remotes/fs/fsrc @@ -0,0 +1,37 @@ +#!/bin/bash + +# -------------------------------------------------------------------------- # +# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +#------------------------------------------------------------------------------ +# Configuration File for File-System based Image Repositories +#------------------------------------------------------------------------------ +export IMAGE_REPOSITORY_PATH=$ONE_LOCATION/var/images + +#------------------------------------------------------------------------------ +# Function used to generate Image names, you should not need to override this +#------------------------------------------------------------------------------ +function generate_image_path { + +CANONICAL_STR="`$DATE +%s`:$ID" + +CANONICAL_MD5=$($MD5SUM - << EOF +$CANONICAL_STR +EOF +) + +echo "$IMAGE_REPOSITORY_PATH/`echo $CANONICAL_MD5 | cut -d ' ' -f1`" +}