2016-05-09 15:27:16 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# AIM : Manage Opennebula database update
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
. /usr/lib/eole/ihm.sh
|
|
|
|
|
|
|
|
function updateDB()
|
|
|
|
{
|
|
|
|
local dbfile='/var/lib/one/one.db'
|
|
|
|
local cmd="onedb"
|
|
|
|
|
2016-09-07 10:24:59 +02:00
|
|
|
if [[ -f ${dbfile} ]]
|
|
|
|
then
|
|
|
|
$cmd upgrade -f -s ${dbfile}
|
|
|
|
return ${?}
|
|
|
|
else
|
|
|
|
return 0
|
|
|
|
fi
|
2016-05-09 15:27:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
echo
|
|
|
|
EchoGras "Mise à jour de la base de données ONE"
|
|
|
|
echo
|
|
|
|
updateDB
|
|
|
|
echo
|
|
|
|
exit ${?}
|