#!/bin/bash
#
#   ConVirt   -  Copyright (c) 2008 Convirture Corp.
#   ======
#
# ConVirt is a Virtualization management tool with a graphical user
# interface that allows for performing the standard set of VM operations
# (start, stop, pause, kill, shutdown, reboot, snapshot, etc...). It
# also attempts to simplify various aspects of VM lifecycle management.
#
#
# This software is subject to the GNU General Public License, Version 2 (GPLv2)
# and for details, please consult it at:
#
#    http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
# 
#
# author : Jd <jd_jedi@users.sourceforge.net>
#

# Distribution and version specific code can go here.
# Assume that common functions are included
# Assme the DIST and the VER to be set here.

# most suse functions should work
source $common_scripts/SUSE_functions

##seed_config()
##{
##   seed_default_config
##   if [ "$?" != "0" ]; then
##       echo "Error creating default config."
##       return 1
##   fi
##
##   adjust_xen_api_version "use_3_1_api"
##   if [ "$?" != "0" ]; then
##       return 1
##   fi
##
##}
#install convirt tool dependencies
install_dependencies(){
   BASE_VER=`echo $VER | cut -d\. -f1`
   if [ "$BASE_VER" == "11" ]; then
         zypper ar http://www.convirture.com/repos/deps/SLES/11.x  convirt-dep
   fi

   if [ "$BASE_VER" == "10" ]; then
       zypper sa http://www.convirture.com/repos/deps/SLES/10.x  convirt-dep
   fi

   set -x
   install_common_dependencies
   set  +x
   if [ "$BASE_VER" == "11" ]; then
        zypper in bc
   fi
}
