1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

feature #523: Added missing file to the repo

This commit is contained in:
Ruben S. Montero 2011-05-12 11:57:23 +02:00
parent b8318b83a5
commit 2dcc717f86

View File

@ -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`"
}