浏览代码

adjust config for host and fix authkeys

Ralf S. Engelschall 21 年之前
父节点
当前提交
b8e20e3472
共有 4 个文件被更改,包括 10 次插入7 次删除
  1. 5 4
      heartbeat/authkeys
  2. 2 2
      heartbeat/ha.cf
  3. 1 1
      heartbeat/haresources
  4. 2 0
      heartbeat/heartbeat.spec

+ 5 - 4
heartbeat/authkeys

@@ -2,7 +2,8 @@
 ##  authkeys -- Heartbeat authentication keys
 ##
 #
-#auth 1
-#1 crc
-#2 sha1 MySecret!
-#3 md5  MySecret!
+auth 1
+1 crc
+2 sha1 MySecret!
+3 md5  MySecret!
+#

+ 2 - 2
heartbeat/ha.cf

@@ -17,9 +17,9 @@ auto_failback on
 udpport	      694
 ucast eth0    192.168.1.2
 #
-node          hostname1 hostname2
+node          @l_hostname@ my-peer-hostname
 #
-#ping         10.10.10.254
+#ping         192.168.1.254
 #deadping     30
 #respawn      hacluster @l_prefix@/sbin/ipfail
 #apiauth      ipfail    gid=haclient uid=hacluster

+ 1 - 1
heartbeat/haresources

@@ -2,5 +2,5 @@
 ##  haresources -- Heartbeat resource configuration
 ##
 #
-hostname1 IPaddr::192.168.1.3/32/eth0 Filesystem::/dev/sda1::/d1::ext3
+@l_hostname@ IPaddr::192.168.1.3/32/eth0 Filesystem::/dev/sda1::/d1::ext3
 #

+ 2 - 0
heartbeat/heartbeat.spec

@@ -151,7 +151,9 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/var/heartbeat
 
     #   install default configuration files
+    l_hostname=`%{l_shtool} echo -e %h`
     %{l_shtool} install -c -m 644 %{l_value -s -a} \
+        -e "s;@l_hostname@;$l_hostname;g" \
         %{SOURCE ha.cf} %{SOURCE haresources} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/heartbeat/
     %{l_shtool} install -c -m 600 %{l_value -s -a} \