From cc888496203d83dd678bd3608d2ca4c80a244aff Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 21 Jul 2010 18:56:57 +0200 Subject: [PATCH] Enabling image hook by default --- install.sh | 7 +++++++ share/etc/oned.conf | 24 +++++++----------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/install.sh b/install.sh index 964a77bcff..5c614ecb20 100755 --- a/install.sh +++ b/install.sh @@ -636,3 +636,10 @@ else rmdir $d done fi + +# --- Substitute variables --- + +if [ $INSTALL_ETC="yes" ]; then + HOOK_LOCATION=$(cd $SHARE_LOCATION/hooks;pwd) + sed -i "s%\[ONE_HOOKS\]%$HOOK_LOCATION%" $ETC_LOCATION/oned.conf +fi \ No newline at end of file diff --git a/share/etc/oned.conf b/share/etc/oned.conf index 0b281293ec..ae8ab9a13c 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -259,26 +259,16 @@ TM_MAD = [ HM_MAD = [ executable = "one_hm" ] - #-------------------------------- Image Hook ----------------------------------- # This hook is used to handle image saving and overwriting when virtual machines # reach the DONE state after being shutdown. -# -# Uncomment one of the following: -# -# Self-contained (substitute [ONE_LOCATION] with its proper path) -# VM_HOOK = [ -# name = "image", -# on = "SHUTDOWN", -# command = "[ONE_LOCATION]/share/hooks/image.rb", -# arguments = "$VMID" ] -# -# System-wide -# VM_HOOK = [ -# name = "image", -# on = "SHUTDOWN", -# command = "/usr/share/doc/opennebula/hooks/image.rb", -# arguments = "$VMID" ] + +VM_HOOK = [ + name = "image", + on = "SHUTDOWN", + command = "[ONE_HOOKS]/image.rb", + arguments = "$VMID" ] + #------------------------------------------------------------------------------- #-------------------------------- Hook Examples --------------------------------