Whamcloud - gitweb
LU-107 Add scripts for implementing heartbeat v1 failover
[fs/lustre-release.git] / lustre / scripts / haconfig
1 #!/bin/bash
2
3 # haconfig - config helper to process heartbeat V1 config skel files
4
5 local=`uname -n`
6
7 [ -x /usr/sbin/ldev ] || exit 0
8 foreign=`/usr/sbin/ldev -p`
9 [ -n "$foreign" ] || exit 0
10
11
12 umask 022
13
14 for file in /etc/ha.d/haresources /etc/ha.d/ha.cf; do
15     if [ -r ${file}.in ]; then
16         sed -e "s!@LOCAL@!$local!g" -e "s!@FOREIGN@!$foreign!g" \
17             < ${file}.in >${file}
18      fi
19 done
20
21 exit 0