• R/O
  • SSH

pm_diskd: Commit

※ リポジトリは、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


Commit MetaInfo

Revisionff75cd9e109366a6e390b1da270efb0766fd26e1 (tree)
Time2010-03-11 16:41:16
AuthorAndrew Beekhof <andrew@beek...>
CommiterAndrew Beekhof

Log Message

Medium: Tools: crm_mon - Add support for older versions of SNMP - Patch derived from the work of sato yuki

Change Summary

Incremental Difference

diff -r 2f3b3c1edea0 -r ff75cd9e1093 configure.ac
--- a/configure.ac Wed Mar 10 16:51:02 2010 +0100
+++ b/configure.ac Thu Mar 11 08:41:16 2010 +0100
@@ -1105,7 +1105,12 @@
11051105 LIBS="$LIBS $SNMPLIBS"
11061106 AC_CHECK_FUNCS(netsnmp_transport_open_client)
11071107 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
11091114 fi
11101115 LIBS=$savedLibs
11111116 fi
diff -r 2f3b3c1edea0 -r ff75cd9e1093 tools/crm_mon.c
--- a/tools/crm_mon.c Wed Mar 10 16:51:02 2010 +0100
+++ b/tools/crm_mon.c Thu Mar 11 08:41:16 2010 +0100
@@ -1194,6 +1194,10 @@
11941194 static netsnmp_session *crm_snmp_init(const char *target)
11951195 {
11961196 static netsnmp_session *session = NULL;
1197+#ifdef NETSNMPV53
1198+ char target53[128];
1199+ snprintf(target53, sizeof(target53), "%s:162", target);
1200+#endif
11971201
11981202 if(session) {
11991203 return session;
@@ -1216,8 +1220,12 @@
12161220 session->callback_magic = NULL;
12171221
12181222 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);
12211229
12221230 if (session == NULL) {
12231231 snmp_sess_perror("Could not create snmp transport", session);
Show on old repository browser