From 2dcc717f86e40b17339957fb01b4e73f83f29318 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 12 May 2011 11:57:23 +0200 Subject: [PATCH] feature #523: Added missing file to the repo --- src/image_mad/remotes/fs/fsrc | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/image_mad/remotes/fs/fsrc 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`" +}