1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-27 13:57:23 +03:00

fixed installer of the image hook

This commit is contained in:
Jaime Melis 2010-08-06 13:17:29 +02:00
parent 4c4dfd6e88
commit 038d5a39aa
2 changed files with 4 additions and 15 deletions

View File

@ -580,19 +580,6 @@ if [ "$UNINSTALL" = "no" ] ; then
done
fi
# --- Prepare oned.conf ---
if [ "$UNINSTALL" = "no" -a "$CLIENT" = "no" ]; then
TEMPLATE=share/etc/oned.conf.template
SOURCE=share/etc/oned.conf
cp $TEMPLATE $SOURCE
HOOKS_LOCATION=$SHARE_LOCATION/hooks
sed -i -e "s%\[HOOKS_LOCATION\]%$HOOKS_LOCATION%" \
$SOURCE
sed -i -e "s%\[IMAGES_LOCATION\]%$IMAGES_LOCATION%" \
$SOURCE
fi
# --- Install/Uninstall files ---
do_file() {

View File

@ -244,7 +244,9 @@ TM_MAD = [
# - SHUTDOWN, after the VM is shutdown
# - STOP, after the VM is stopped (including VM image transfers)
# - DONE, after the VM is deleted or shutdown
# command : use absolute path here
# command : path can be absolute or relative to $ONE_LOCATION/share/hooks
# case of self-contained installation or relative to
# /usr/share/one/hooks in case of system-wide installation
# arguments : for the hook. You can access to VM template variables with $
# - $ATTR, the value of an attribute e.g. $NAME or $VMID
# - $ATTR[VAR], the value of a vector e.g. $NIC[MAC]
@ -266,7 +268,7 @@ HM_MAD = [
VM_HOOK = [
name = "image",
on = "DONE",
command = "[HOOKS_LOCATION]/image.rb",
command = "image.rb",
arguments = "$VMID" ]
#-------------------------------------------------------------------------------