• 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

Revision5f8118b6626ca72169d947b3bfb24946f311b4b7 (tree)
Time2010-03-25 04:31:34
AuthorDejan Muhamedagic <dejan@hell...>
CommiterDejan Muhamedagic

Log Message

Medium: RA: SystemHealth: exit properly when the required software is not installed (bnc#587940)

Change Summary

Incremental Difference

diff -r 20c686153cab -r 5f8118b6626c extra/resources/SystemHealth
--- a/extra/resources/SystemHealth Tue Mar 23 17:15:22 2010 +0100
+++ b/extra/resources/SystemHealth Wed Mar 24 20:31:34 2010 +0100
@@ -76,7 +76,7 @@
7676
7777 if [ $RC != 0 ]; then
7878 ocf_log err "servicelog_notify not found!"
79- return $RC
79+ return $OCF_ERR_INSTALLED
8080 fi
8181
8282 which ipmiservicelogd > /dev/null 2>&1
@@ -84,7 +84,15 @@
8484
8585 if [ $RC != 0 ]; then
8686 ocf_log err "ipmiservicelogd not found!"
87- return $RC
87+ return $OCF_ERR_INSTALLED
88+ fi
89+
90+ test -x $OCF_RESKEY_program
91+ RC=$?
92+
93+ if [ $RC != 0 ]; then
94+ ocf_log err "$OCF_RESKEY_program not found!"
95+ return $OCF_ERR_INSTALLED
8896 fi
8997 }
9098
@@ -166,13 +174,6 @@
166174 # (SUCCESS), failed (ERROR) or _cleanly_ stopped (NOT RUNNING).
167175 # That is THREE states, not just yes/no.
168176
169- SystemHealth_check_tools
170- RC=$?
171-
172- if [ $RC != 0 ]; then
173- return $OCF_ERR_GENERIC
174- fi
175-
176177 if [ ! -f /var/run/ipmiservicelogd.pid0 ]; then
177178 ocf_log debug "ipmiservicelogd is not running!"
178179 return $OCF_NOT_RUNNING
@@ -205,7 +206,7 @@
205206 RC=$?
206207
207208 if [ $RC != 0 ]; then
208- return $OCF_ERR_ARGS
209+ return $RC
209210 fi
210211
211212 return $OCF_SUCCESS
@@ -217,16 +218,29 @@
217218 meta-data) meta_data
218219 exit $OCF_SUCCESS
219220 ;;
221+usage|help) SystemHealth_usage
222+ exit $OCF_SUCCESS
223+ ;;
224+esac
225+
226+SystemHealth_check_tools
227+RC=$?
228+
229+if [ $RC != 0 ]; then
230+ case $__OCF_ACTION in
231+ stop) exit $OCF_SUCCESS;;
232+ *) exit $RC;;
233+ esac
234+fi
235+
236+case $__OCF_ACTION in
220237 start) SystemHealth_start;;
221238 stop) SystemHealth_stop;;
222239 monitor) SystemHealth_monitor;;
223-reload) ocf_log err "Reloading..."
240+reload) ocf_log info "Reloading..."
224241 SystemHealth_start
225242 ;;
226-validate-all) SystemHealth_validate;;
227-usage|help) SystemHealth_usage
228- exit $OCF_SUCCESS
229- ;;
243+validate-all) ;;
230244 *) SystemHealth_usage
231245 exit $OCF_ERR_UNIMPLEMENTED
232246 ;;
Show on old repository browser