※ リポジトリは、pm-diskd ブランチが https://github.com/linux-ha-japan/pm_diskd-1.0 へ、pm-diskd-2.0ブランチが https://github.com/linux-ha-japan/pm_diskd へ移行しました。
Pacemaker 対応ディスク故障監視機能。
Pacemaker-1.0公式リポジトリのクローンに対し、パッチ作成用のブランチを作成して管理する。
ブランチ名: pm-diskd
初回 hg clone 実行後は、hg update -r pm-diskd を実行すること。
Heartbeat-2.1.4 用 hb-diskd(*) のPacemaker対応版
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10555
Revision | ff75cd9e109366a6e390b1da270efb0766fd26e1 (tree) |
---|---|
Time | 2010-03-11 16:41:16 |
Author | Andrew Beekhof <andrew@beek...> |
Commiter | Andrew Beekhof |
Medium: Tools: crm_mon - Add support for older versions of SNMP - Patch derived from the work of sato yuki
@@ -1105,7 +1105,12 @@ | ||
1105 | 1105 | LIBS="$LIBS $SNMPLIBS" |
1106 | 1106 | AC_CHECK_FUNCS(netsnmp_transport_open_client) |
1107 | 1107 | if test $ac_cv_func_netsnmp_transport_open_client != yes; then |
1108 | - SUPPORT_SNMP=no | |
1108 | + AC_CHECK_FUNCS(netsnmp_tdomain_transport) | |
1109 | + if test $ac_cv_func_netsnmp_tdomain_transport != yes; then | |
1110 | + SUPPORT_SNMP=no | |
1111 | + else | |
1112 | + AC_DEFINE_UNQUOTED(NETSNMPV53, 1, [Use the older 5.3 version of the net-snmp API]) | |
1113 | + fi | |
1109 | 1114 | fi |
1110 | 1115 | LIBS=$savedLibs |
1111 | 1116 | fi |
@@ -1194,6 +1194,10 @@ | ||
1194 | 1194 | static netsnmp_session *crm_snmp_init(const char *target) |
1195 | 1195 | { |
1196 | 1196 | static netsnmp_session *session = NULL; |
1197 | +#ifdef NETSNMPV53 | |
1198 | + char target53[128]; | |
1199 | + snprintf(target53, sizeof(target53), "%s:162", target); | |
1200 | +#endif | |
1197 | 1201 | |
1198 | 1202 | if(session) { |
1199 | 1203 | return session; |
@@ -1216,8 +1220,12 @@ | ||
1216 | 1220 | session->callback_magic = NULL; |
1217 | 1221 | |
1218 | 1222 | session = snmp_add(session, |
1219 | - netsnmp_transport_open_client("snmptrap", target), | |
1220 | - NULL, NULL); | |
1223 | +#ifdef NETSNMPV53 | |
1224 | + netsnmp_tdomain_transport(target53, 0, "udp"), | |
1225 | +#else | |
1226 | + netsnmp_transport_open_client("snmptrap", target), | |
1227 | +#endif | |
1228 | + NULL, NULL); | |
1221 | 1229 | |
1222 | 1230 | if (session == NULL) { |
1223 | 1231 | snmp_sess_perror("Could not create snmp transport", session); |