3 # ovirt Start ovirt services
7 # Required-Start: ovirt-awake
8 # Default-Start: 2 3 4 5
9 # Description: Performs managed node configuration functions.
12 # Source functions library
13 .
/etc
/init.d
/functions
14 .
/usr
/libexec
/ovirt-functions
17 VAR_SUBSYS_OVIRT
=/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"
39 if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
40 collectd_conf
=/etc
/collectd.conf
41 if [ -f $collectd_conf.
in ]; then
42 sed -e "s/@COLLECTD_SERVER@/$SRV_HOST/" \
43 -e "s/@COLLECTD_PORT@/$SRV_PORT/" \
44 -e "/<Plugin rrdtool>/,/<\/Plugin>/d" $collectd_conf.
in \
47 log
"Failed to write $collectd_conf"; return 1
51 log
"skipping collectd configuration, collectd service not available"
55 if [ -n "$SRV_HOST" -a -n "$SRV_PORT" ]; then
56 libvirt_qpid_conf
=/etc
/sysconfig
/libvirt-qpid
57 if [ -f $libvirt_qpid_conf ]; then
58 echo "LIBVIRT_QPID_ARGS=\"--broker $SRV_HOST --port $SRV_PORT\"" >> $libvirt_qpid_conf
59 echo "/usr/kerberos/bin/kinit -k -t /etc/libvirt/krb5.tab qpidd/`hostname`" >> $libvirt_qpid_conf
61 matahari_conf
=/etc
/sysconfig
/matahari
62 if [ -f $matahari_conf ]; then
63 echo "MATAHARI_ARGS=\"--broker $SRV_HOST --port $SRV_PORT\"" >> $matahari_conf
64 echo "/usr/kerberos/bin/kinit -k -t /etc/libvirt/krb5.tab qpidd/`hostname`" >> $matahari_conf
67 log
"skipping libvirt-qpid and matahari configuration, could not find $libvirt_qpid_conf"
72 touch $VAR_SUBSYS_OVIRT
73 case $OVIRT_RUNTIME_MODE in
78 if [ -x $MANAGEMENT_SCRIPTS_DIR/ready
]; then
79 log
"Executing $MANAGEMENT_SCRIPTS_DIR/ready."
80 $MANAGEMENT_SCRIPTS_DIR/ready
83 log
"No script to perform node activation."
86 rm -f $VAR_SUBSYS_OVIRT
91 echo -n "Stopping ovirt: "
92 rm -f $VAR_SUBSYS_OVIRT
103 [ -f "$VAR_SUBSYS_OVIRT" ] && exit 0
104 echo -n "Starting ovirt: "
108 log
"Completed ovirt"
109 } >> $OVIRT_LOGFILE 2>&1
110 test $?
== 0 && success || failure
122 echo "Usage: ovirt {start}"