#!/bin/bash
##
# Flush xapi db after other firstboot scripts have run

set -e

. ${XENSOURCE_INVENTORY}
UPGRADE="false"
[ -r ${FIRSTBOOT_DATA_DIR}/host.conf ] && . ${FIRSTBOOT_DATA_DIR}/host.conf

start() {
    [ "$UPGRADE" = true ] && return 0
    $XE pool-sync-database 
}

case $1 in
    start)  start ;;
esac
