#!/bin/bash

. /usr/libexec/ovirt-functions

PATH=$PATH:/sbin:/usr/sbin
ME=$(basename "$0")
warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
die() { warn "$@"; exit 1; }

usage() {
    echo "Usage: $ME"
}

# first, check to see we are root
if [ $( id -u ) -ne 0 ]; then
    die "Must run as root"
fi

chkconfig --level 3 ovirt-early on
chkconfig --level 3 ovirt on
chkconfig --level 3 ovirt-post on
#chkconfig --level 3 collectd on
#chkconfig --level 3 anyterm on

#ovirt_setup_libvirtd
#ovirt_setup_anyterm

# make sure we don't autostart virbr0 on libvirtd startup
rm -f /etc/libvirt/qemu/networks/autostart/default.xml

# remove the /etc/krb5.conf file; it will be fetched on bootup
rm -f /etc/krb5.conf
