diff --git a/tools/ocft/Xinetd b/tools/ocft/Xinetd index bff9f726d..53f4f6504 100644 --- a/tools/ocft/Xinetd +++ b/tools/ocft/Xinetd @@ -1,64 +1,64 @@ # Xinetd CONFIG Agent Xinetd AgentRoot /usr/lib/ocf/resource.d/heartbeat InstallPackage xinetd SETUP-AGENT sed -i /disable/s/yes/no/ /etc/xinetd.d/echo - if which rcxinetd >/dev/null 2>&1; then - rcxinetd start + if which /etc/init.d/xinetd >/dev/null 2>&1; then + /etc/init.d/xinetd start elif systemctl list-unit-files | grep -qs xinetd; then systemctl start xinetd fi CASE-BLOCK required_args Env OCF_RESKEY_service=discard 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: unset 'OCF_RESKEY_protocol'" Include prepare Unenv OCF_RESKEY_service 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 with running" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS CASE "monitor with 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/apache b/tools/ocft/apache index b2219ec26..e93904471 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 - rcapache2 start - rcapache2 stop + /etc/init.d/apache2 start + /etc/init.d/apache2 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/mysql b/tools/ocft/mysql index bae0dc723..27fcb587a 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 - rcmysql start - rcmysql stop + /etc/init.d/mysql start + /etc/init.d/mysql 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 15024a8bb..90a4351bc 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 - rcnamed start - rcnamed stop + /etc/init.d/named start + /etc/init.d/named 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 abab33fe0..9944b09e4 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 - rcpostgresql start - rcpostgresql stop + /etc/init.d/postgresql start + /etc/init.d/postgresql 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