3 # ovirt Start ovirt services
6 # description: ovirt services
9 # Source functions library
10 .
/etc
/init.d
/functions
11 .
/etc
/init.d
/ovirt-functions
14 lockfile
=/var
/lock
/subsys
/$prog
20 if is_standalone
; then
24 if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
25 krb5_conf
=/etc
/krb5.conf
26 # FIXME this is IPA specific
27 wget
-q --no-check-certificate \
28 http
://$SRV_HOST:$SRV_PORT/ipa
/config
/krb5.ini
-O $krb5_conf.tmp
30 log
"Failed to get $krb5_conf"; return 1
32 mv $krb5_conf.tmp
$krb5_conf
34 log
"skipping Kerberos configuration"
38 if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
39 krb5_tab
=/etc
/libvirt
/krb5.tab
40 # skip ktab download if we got it from /config
41 if [ -s $krb5_tab ]; then
44 ovirt-awake start
$SRV_HOST $SRV_PORT $krb5_tab
46 log
"ovirt-awake failed"; return 1
49 log
"skipping ovirt-awake, oVirt identify service not available"
53 if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
54 collectd_conf
=/etc
/collectd.conf
55 if [ -f $collectd_conf.
in ]; then
56 sed -e "s/@COLLECTD_SERVER@/$SRV_HOST/" \
57 -e "s/@COLLECTD_PORT@/$SRV_PORT/" \
58 -e "/<Plugin rrdtool>/,/<\/Plugin>/d" $collectd_conf.
in \
61 log
"Failed to write $collectd_conf"; return 1
65 log
"skipping collectd configuration, collectd service not available"
69 if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
70 libvirt_qpid_conf
=/etc
/sysconfig
/libvirt-qpid
71 if [ -f $libvirt_qpid_conf ]; then
72 echo "LIBVIRT_QPID_ARGS=\"--broker $SRV_HOST --port $SRV_PORT\"" >> $libvirt_qpid_conf
73 echo "/usr/kerberos/bin/kinit -k -t /etc/libvirt/krb5.tab qpidd/`hostname`" >> $libvirt_qpid_conf
75 matahari_conf
=/etc
/sysconfig
/matahari
76 if [ -f $matahari_conf ]; then
77 echo "MATAHARI_ARGS=\"--broker $SRV_HOST --port $SRV_PORT\"" >> $matahari_conf
78 echo "/usr/kerberos/bin/kinit -k -t /etc/libvirt/krb5.tab qpidd/`hostname`" >> $matahari_conf
81 log
"skipping libvirt-qpid and matahari configuration, could not find $libvirt_qpid_conf"
89 printf "Starting ovirt: "
95 } >> $OVIRT_LOGFILE 2>&1
97 test $?
== 0 && success || failure
111 echo "Usage: ovirt {start}"