Debian Codegraph @

tools/ocft/nfsserver

raw ◀ ▶
1 Debian patch touch this file
1 # nfsserver
2
3 CONFIG
4 Agent nfsserver
5 AgentRoot /usr/lib/ocf/resource.d/heartbeat
6 InstallPackage nfs-kernel-server
7 HangTimeout 20
8
9 SETUP-AGENT
10 INITSCRIPT=""
11 if test -f /etc/init.d/nfsserver; then
12 INITSCRIPT="/etc/init.d/nfsserver"
13 fi
•14 service nfs-kernel-server stop
15 true
16
17 CASE-BLOCK required_args
18 Env OCF_RESKEY_nfs_init_script=$INITSCRIPT
19
20 CASE-BLOCK default_status
21 AgentRun stop
22
23 CASE-BLOCK prepare
24 Include required_args
25 Include default_status
26
27 CASE "check base env"
28 Include prepare
29 AgentRun start OCF_SUCCESS
30
31 CASE "check base env: invalid 'OCF_RESKEY_nfs_notify_cmd'"
32 Include prepare
33 Env OCF_RESKEY_nfs_notify_cmd=no_such_program
34 AgentRun start OCF_ERR_INSTALLED
35
36 CASE "normal start"
37 Include prepare
38 AgentRun start OCF_SUCCESS
39
40 CASE "normal stop"
41 Include prepare
42 AgentRun start
43 AgentRun stop OCF_SUCCESS
44
45 CASE "double start"
46 Include prepare
47 AgentRun start
48 AgentRun start OCF_SUCCESS
49
50 CASE "double stop"
51 Include prepare
52 AgentRun stop OCF_SUCCESS
53
54 CASE "monitor with running"
55 Include prepare
56 AgentRun start
57 AgentRun monitor OCF_SUCCESS
58
59 CASE "monitor with not running"
60 Include prepare
61 AgentRun monitor OCF_NOT_RUNNING
62
63 CASE "unimplemented command"
64 Include prepare
65 AgentRun no_cmd OCF_ERR_UNIMPLEMENTED