diff --git a/install.sh b/install.sh index 35c6a48c77..967345dd81 100755 --- a/install.sh +++ b/install.sh @@ -86,6 +86,8 @@ done # Definition of locations #------------------------------------------------------------------------------- +CONF_LOCATION="$HOME/.one" + if [ -z "$ROOT" ] ; then BIN_LOCATION="/usr/bin" LIB_LOCATION="/usr/lib/one" @@ -107,7 +109,8 @@ if [ -z "$ROOT" ] ; then CHOWN_DIRS="" elif [ "$SUNSTONE" = "yes" ]; then - MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION $SUNSTONE_LOCATION" + MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION \ + $SUNSTONE_LOCATION $ETC_LOCATION" DELETE_DIRS="$MAKE_DIRS" @@ -136,11 +139,12 @@ else MAN_LOCATION="$ROOT/share/man/man1" if [ "$CLIENT" = "yes" ]; then - MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION" + MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $CONF_LOCATION" DELETE_DIRS="$MAKE_DIRS" elif [ "$SUNSTONE" = "yes" ]; then - MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION $SUNSTONE_LOCATION" + MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION \ + $SUNSTONE_LOCATION $ETC_LOCATION" DELETE_DIRS="$MAKE_DIRS" else @@ -172,7 +176,8 @@ ETC_DIRS="$ETC_LOCATION/im_kvm \ $ETC_LOCATION/hm \ $ETC_LOCATION/auth \ $ETC_LOCATION/ec2query_templates \ - $ETC_LOCATION/occi_templates" + $ETC_LOCATION/occi_templates \ + $ETC_LOCATION/cli" LIB_DIRS="$LIB_LOCATION/ruby \ $LIB_LOCATION/ruby/OpenNebula \ @@ -187,7 +192,9 @@ LIB_DIRS="$LIB_LOCATION/ruby \ $LIB_LOCATION/tm_commands/dummy \ $LIB_LOCATION/tm_commands/lvm \ $LIB_LOCATION/mads \ - $LIB_LOCATION/sh" + $LIB_LOCATION/sh \ + $LIB_LOCATION/ruby/cli \ + $LIB_LOCATION/ruby/cli/one_helper" VAR_DIRS="$VAR_LOCATION/remotes \ $VAR_LOCATION/remotes/im \ @@ -229,12 +236,14 @@ LIB_OCCI_CLIENT_DIRS="$LIB_LOCATION/ruby \ LIB_OCA_CLIENT_DIRS="$LIB_LOCATION/ruby \ $LIB_LOCATION/ruby/OpenNebula" -LIB_CLI_DIRS="$LIB_LOCATION/ruby \ - $LIB_LOCATION/ruby/OpenNebula" +LIB_CLI_CLIENT_DIRS="$LIB_LOCATION/ruby/cli \ + $LIB_LOCATION/ruby/cli/one_helper" + +CONF_CLI_DIRS="$CONF_LOCATION/cli" if [ "$CLIENT" = "yes" ]; then MAKE_DIRS="$MAKE_DIRS $LIB_ECO_CLIENT_DIRS $LIB_OCCI_CLIENT_DIRS \ - $LIB_CLI_DIRS" + $LIB_OCA_CLIENT_DIRS $LIB_CLI_CLIENT_DIRS $CONF_CLI_DIRS" elif [ "$SUNSTONE" = "yes" ]; then MAKE_DIRS="$MAKE_DIRS $SUNSTONE_DIRS $LIB_OCA_CLIENT_DIRS" else @@ -256,7 +265,7 @@ INSTALL_FILES=( MAD_RUBY_LIB_FILES:$VAR_LOCATION/remotes MAD_SH_LIB_FILES:$LIB_LOCATION/sh MAD_SH_LIB_FILES:$VAR_LOCATION/remotes - ONEDB_MIGRATOR_FILES:$LIB_LOCATION/onedb + ONEDB_MIGRATOR_FILES:$LIB_LOCATION/ruby/onedb MADS_LIB_FILES:$LIB_LOCATION/mads IM_PROBES_FILES:$VAR_LOCATION/remotes/im IM_PROBES_KVM_FILES:$VAR_LOCATION/remotes/im/kvm.d @@ -284,6 +293,8 @@ INSTALL_FILES=( OCCI_LIB_FILES:$LIB_LOCATION/ruby/cloud/occi OCCI_BIN_FILES:$BIN_LOCATION MAN_FILES:$MAN_LOCATION + CLI_LIB_FILES:$LIB_LOCATION/ruby/cli + ONE_CLI_LIB_FILES:$LIB_LOCATION/ruby/cli/one_helper ) INSTALL_CLIENT_FILES=( @@ -294,18 +305,22 @@ INSTALL_CLIENT_FILES=( OCCI_LIB_CLIENT_FILES:$LIB_LOCATION/ruby/cloud/occi OCCI_BIN_CLIENT_FILES:$BIN_LOCATION CLI_BIN_FILES:$BIN_LOCATION - CLI_LIB_FILES:$LIB_LOCATION/ruby + CLI_LIB_FILES:$LIB_LOCATION/ruby/cli + ONE_CLI_LIB_FILES:$LIB_LOCATION/ruby/cli/one_helper + CLI_CONF_FILES:$CONF_LOCATION/cli + OCA_LIB_FILES:$LIB_LOCATION/ruby RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula ) INSTALL_SUNSTONE_RUBY_FILES=( - SUNSTONE_RUBY_LIB_FILES:$LIB_LOCATION/ruby RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula + OCA_LIB_FILES:$LIB_LOCATION/ruby ) INSTALL_SUNSTONE_FILES=( SUNSTONE_FILES:$SUNSTONE_LOCATION SUNSTONE_BIN_FILES:$BIN_LOCATION + SUNSTONE_ETC_FILES:$ETC_LOCATION SUNSTONE_MODELS_FILES:$SUNSTONE_LOCATION/models SUNSTONE_MODELS_JSON_FILES:$SUNSTONE_LOCATION/models/OpenNebulaJSON SUNSTONE_TEMPLATE_FILES:$SUNSTONE_LOCATION/templates @@ -338,6 +353,7 @@ INSTALL_ETC_FILES=( OCCI_ETC_FILES:$ETC_LOCATION OCCI_ETC_TEMPLATE_FILES:$ETC_LOCATION/occi_templates SUNSTONE_ETC_FILES:$ETC_LOCATION + CLI_CONF_FILES:$ETC_LOCATION/cli ) #------------------------------------------------------------------------------- @@ -351,9 +367,9 @@ BIN_FILES="src/nebula/oned \ src/cli/onevnet \ src/cli/oneuser \ src/cli/oneimage \ - src/cli/onetemplate \ src/cli/onegroup \ - src/cli/onedb \ + src/cli/onetemplate \ + src/onedb/onedb \ share/scripts/one \ src/authm_mad/oneauth" @@ -375,8 +391,6 @@ RUBY_LIB_FILES="src/mad/ruby/ActionManager.rb \ src/mad/ruby/OpenNebulaDriver.rb \ src/mad/ruby/VirtualMachineDriver.rb \ src/mad/ruby/Ganglia.rb \ - src/cli/client_utilities.rb \ - src/cli/command_parse.rb \ src/oca/ruby/OpenNebula.rb \ src/tm_mad/TMScript.rb \ src/authm_mad/one_usage.rb \ @@ -385,24 +399,6 @@ RUBY_LIB_FILES="src/mad/ruby/ActionManager.rb \ src/authm_mad/simple_permissions.rb \ src/authm_mad/ssh_auth.rb" -RUBY_OPENNEBULA_LIB_FILES="src/oca/ruby/OpenNebula/Host.rb \ - src/oca/ruby/OpenNebula/HostPool.rb \ - src/oca/ruby/OpenNebula/Pool.rb \ - src/oca/ruby/OpenNebula/User.rb \ - src/oca/ruby/OpenNebula/UserPool.rb \ - src/oca/ruby/OpenNebula/VirtualMachine.rb \ - src/oca/ruby/OpenNebula/VirtualMachinePool.rb \ - src/oca/ruby/OpenNebula/VirtualNetwork.rb \ - src/oca/ruby/OpenNebula/VirtualNetworkPool.rb \ - src/oca/ruby/OpenNebula/Image.rb \ - src/oca/ruby/OpenNebula/ImagePool.rb \ - src/oca/ruby/OpenNebula/Template.rb \ - src/oca/ruby/OpenNebula/TemplatePool.rb \ - src/oca/ruby/OpenNebula/Group.rb \ - src/oca/ruby/OpenNebula/GroupPool.rb \ - src/oca/ruby/OpenNebula/XMLUtils.rb" - - #----------------------------------------------------------------------------- # MAD Script library files, to be installed under $LIB_LOCATION/