diff --git a/tools/ocft/apache b/tools/ocft/apache index e93904471..b2219ec26 100644 --- a/tools/ocft/apache +++ b/tools/ocft/apache @@ -1,63 +1,63 @@ # apache # make sure that your apache configuration loads mod_status CONFIG Agent apache AgentRoot /usr/lib/ocf/resource.d/heartbeat InstallPackage apache2 HangTimeout 20 SETUP-AGENT - /etc/init.d/apache2 start - /etc/init.d/apache2 stop + rcapache2 start + rcapache2 stop CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include default_status CASE "check base env" Include prepare AgentRun start OCF_SUCCESS CASE "check base env: set non-existing OCF_RESKEY_statusurl" Include prepare Env OCF_RESKEY_statusurl="yoyoyoyo" AgentRun start OCF_ERR_GENERIC CASE "check base env: set non-existing OCF_RESKEY_configfile" Include prepare Env OCF_RESKEY_configfile="/yoyoyoyo/nosuchfile" AgentRun start OCF_ERR_INSTALLED CASE "normal start" Include prepare AgentRun start OCF_SUCCESS CASE "normal stop" Include prepare AgentRun start AgentRun stop OCF_SUCCESS CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS CASE "running monitor" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS CASE "not running monitor" Include prepare AgentRun monitor OCF_NOT_RUNNING CASE "unimplemented command" Include prepare AgentRun no_cmd OCF_ERR_UNIMPLEMENTED diff --git a/tools/ocft/iscsi b/tools/ocft/iscsi index c1325a1c6..7b0452a6c 100644 --- a/tools/ocft/iscsi +++ b/tools/ocft/iscsi @@ -1,82 +1,82 @@ # iscsi CONFIG Agent iscsi AgentRoot /usr/lib/ocf/resource.d/heartbeat InstallPackage open-iscsi InstallPackage iscsitarget HangTimeout 20 VARIABLE OCFT_disk=/var/run/resource-agents/ocft-iscsi OCFT_target="iqn.2011-03.ocft.localhost:disk0" OCFT_portal="127.0.0.1:3260" SETUP-AGENT dd if=/dev/zero of=$OCFT_disk bs=1024k count=1 2>/dev/null echo Target $OCFT_target >> /etc/ietd.conf echo " Lun 0 Path=$OCFT_disk,Type=fileio" >> /etc/ietd.conf - /etc/init.d/iscsitarget start - /etc/init.d/open-iscsi start - /etc/init.d/iscsitarget restart + rciscsitarget start + rcopen-iscsi start + rciscsitarget restart CLEANUP-AGENT rm -f $OCFT_disk sed -i "/^Target $OCFT_target/,+1d" /etc/ietd.conf CASE-BLOCK required_args Env OCF_RESKEY_portal=$OCFT_portal Env OCF_RESKEY_target=$OCFT_target CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include required_args Include default_status CASE "check base env" Include prepare AgentRun start OCF_SUCCESS CASE "check base env: invalid 'OCF_RESKEY_portal'" Include prepare Unenv OCF_RESKEY_portal AgentRun start OCF_ERR_CONFIGURED CASE "check base env: unset 'OCF_RESKEY_target'" Include prepare Unenv OCF_RESKEY_target AgentRun start OCF_ERR_CONFIGURED CASE "normal start" Include prepare AgentRun start OCF_SUCCESS CASE "normal stop" Include prepare AgentRun start AgentRun stop OCF_SUCCESS CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS CASE "monitor when running" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS CASE "monitor when not running" Include prepare AgentRun monitor OCF_NOT_RUNNING CASE "unimplemented command" Include prepare AgentRun no_cmd OCF_ERR_UNIMPLEMENTED diff --git a/tools/ocft/mysql b/tools/ocft/mysql index 27fcb587a..bae0dc723 100644 --- a/tools/ocft/mysql +++ b/tools/ocft/mysql @@ -1,77 +1,77 @@ # mysql CONFIG Agent mysql AgentRoot /usr/lib/ocf/resource.d/heartbeat InstallPackage mysql HangTimeout 20 SETUP-AGENT - /etc/init.d/mysql start - /etc/init.d/mysql stop + rcmysql start + rcmysql stop CASE-BLOCK crm_setting Env OCF_RESKEY_CRM_meta_timeout=15000 CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include crm_setting Include default_status CASE "check base env" Include prepare AgentRun start OCF_SUCCESS CASE "check base env: invalid 'OCF_RESKEY_binary'" Include prepare Env OCF_RESKEY_binary=no_such AgentRun start OCF_ERR_INSTALLED CASE "normal start" Include prepare AgentRun start OCF_SUCCESS CASE "normal stop" Include prepare AgentRun start AgentRun stop OCF_SUCCESS CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS CASE "running monitor" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS CASE "not running monitor" Include prepare AgentRun monitor OCF_NOT_RUNNING CASE "check lib file" Include prepare Bash chmod u-w /var/lib/mysql BashAtExit chmod u+w /var/lib/mysql AgentRun start OCF_ERR_PERM CASE "unimplemented command" Include prepare AgentRun no_cmd OCF_ERR_UNIMPLEMENTED CASE "non-existent user" Include prepare Env OCF_RESKEY_user=no_user AgentRun start OCF_ERR_INSTALLED CASE "invalid user" Include prepare Env OCF_RESKEY_user=nobody AgentRun start OCF_ERR_PERM diff --git a/tools/ocft/named b/tools/ocft/named index 90a4351bc..15024a8bb 100644 --- a/tools/ocft/named +++ b/tools/ocft/named @@ -1,69 +1,69 @@ #named # To work properly this test requires that standard bind and bin-utils # packages installed. CONFIG Agent named AgentRoot /usr/lib/ocf/resource.d/heartbeat InstallPackage bind InstallPackage bind-utils SETUP-AGENT - /etc/init.d/named start - /etc/init.d/named stop + rcnamed start + rcnamed stop CASE-BLOCK crm_setting Env OCF_RESKEY_CRM_meta_timeout=15000 CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include crm_setting Include default_status CASE "check base env" Include prepare AgentRun start OCF_SUCCESS CASE "check base env: invalid 'OCF_RESKEY_named'" Include prepare Env OCF_RESKEY_named=no_such AgentRun start OCF_ERR_INSTALLED CASE "normal start" Include prepare AgentRun start OCF_SUCCESS CASE "normal stop" Include prepare AgentRun start AgentRun stop OCF_SUCCESS CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS CASE "running monitor" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS CASE "not running monitor" Include prepare AgentRun monitor OCF_NOT_RUNNING CASE "unimplemented command" Include prepare AgentRun no_cmd OCF_ERR_UNIMPLEMENTED CASE "non-existent user" Include prepare Env OCF_RESKEY_named_user=no_user AgentRun start OCF_ERR_INSTALLED diff --git a/tools/ocft/pgsql b/tools/ocft/pgsql index 9944b09e4..abab33fe0 100644 --- a/tools/ocft/pgsql +++ b/tools/ocft/pgsql @@ -1,71 +1,71 @@ # pgsql CONFIG Agent pgsql AgentRoot /usr/lib/ocf/resource.d/heartbeat InstallPackage postgresql-server HangTimeout 20 SETUP-AGENT - /etc/init.d/postgresql start - /etc/init.d/postgresql stop + rcpostgresql start + rcpostgresql stop CASE-BLOCK crm_setting Env OCF_RESKEY_CRM_meta_timeout=15000 CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include crm_setting Include default_status CASE "check base env" Include prepare AgentRun start OCF_SUCCESS CASE "check base env: invalid 'OCF_RESKEY_pgctl'" Include prepare Env OCF_RESKEY_pgctl=no_such AgentRun start OCF_ERR_INSTALLED CASE "normal start" Include prepare AgentRun start OCF_SUCCESS CASE "normal stop" Include prepare AgentRun start AgentRun stop OCF_SUCCESS CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS CASE "running monitor" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS CASE "not running monitor" Include prepare AgentRun monitor OCF_NOT_RUNNING CASE "unimplemented command" Include prepare AgentRun no_cmd OCF_ERR_UNIMPLEMENTED CASE "non-existent user" Include prepare Env OCF_RESKEY_pgdba=no_user AgentRun start OCF_ERR_INSTALLED CASE "invalid user" Include prepare Env OCF_RESKEY_pgdba=nobody AgentRun start OCF_ERR_PERM