1
# Copyright (C) 2007 Dejan Muhamedagic <dmuhamedagic@suse.de>
3
# This program is free software; you can redistribute it and/or
4
# modify it under the terms of the GNU General Public
5
# License as published by the Free Software Foundation; either
6
# version 2.1 of the License, or (at your option) any later version.
8
# This software is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# General Public License for more details.
13
# You should have received a copy of the GNU General Public
14
# License along with this library; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
# NB: This is not going to work unless you source /etc/ha.d/shellfuncs!
21
# Stack specific part (heartbeat)
22
# ha.cf/logd.cf parsing
25
[ -f "$CONF" ] || return
26
sed 's/#.*//' < $CONF |
28
sed 's/^[^[:space:]]*[[:space:]]*//'
35
egrep -qsi "^(true|y|yes|on|1)"
38
iscfvartrue use_logd &&
39
return 0 # if use_logd true
40
iscfvarset logfacility ||
42
iscfvarset debugfile ||
43
return 0 # or none of the log options set
47
# unless logfacility is set to none, heartbeat/ha_logd are
48
# going to log through syslog
49
HA_LOGFACILITY=`getcfvar logfacility`
50
[ "" = "$HA_LOGFACILITY" ] && HA_LOGFACILITY=$DEFAULT_HA_LOGFACILITY
51
[ none = "$HA_LOGFACILITY" ] && HA_LOGFACILITY=""
52
HA_LOGFILE=`getcfvar logfile`
53
HA_DEBUGFILE=`getcfvar debugfile`
56
HA_LOGFACILITY=${HA_LOGFACILITY:-$DEFAULT_HA_LOGFACILITY}
58
cfdebug=`getcfvar debug` # prefer debug level if set
59
isnumber $cfdebug || cfdebug=""
60
[ "$cfdebug" ] && [ $cfdebug -gt 0 ] &&
64
return # no configuration: use defaults
71
echo "heartbeat version: `$HA_BIN/heartbeat -V`"
75
d $HA_VARLIB 0755 root root
76
d $HA_VARLIB/ccm 0750 hacluster haclient
77
d $HA_VARLIB/pengine 0750 hacluster haclient
78
d $HA_VARLIB/crm 0750 hacluster haclient