pacemaker  2.1.3-ea053b43a
Scalable High-Availability cluster resource manager
Macros | Functions
services_lsb.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <crm/crm.h>
#include <crm/services.h>
#include "services_private.h"
#include "services_lsb.h"
#include <crm/services_compat.h>
Include dependency graph for services_lsb.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 
#define lsb_metadata_template
 
#define LSB_INITSCRIPT_INFOBEGIN_TAG   "### BEGIN INIT INFO"
 
#define LSB_INITSCRIPT_INFOEND_TAG   "### END INIT INFO"
 
#define PROVIDES   "# Provides:"
 
#define REQ_START   "# Required-Start:"
 
#define REQ_STOP   "# Required-Stop:"
 
#define SHLD_START   "# Should-Start:"
 
#define SHLD_STOP   "# Should-Stop:"
 
#define DFLT_START   "# Default-Start:"
 
#define DFLT_STOP   "# Default-Stop:"
 
#define SHORT_DSCR   "# Short-Description:"
 
#define DESCRIPTION   "# Description:"
 
#define lsb_meta_helper_free_value(m)
 
#define DESC_MAX   2048
 

Functions

int services__get_lsb_metadata (const char *type, char **output)
 
GList * services__list_lsb_agents (void)
 
bool services__lsb_agent_exists (const char *agent)
 
int services__lsb_prepare (svc_action_t *op)
 
enum ocf_exitcode services__lsb2ocf (const char *action, int exit_status)
 
svc_action_tservices_action_create (const char *name, const char *action, guint interval_ms, int timeout)
 
GList * services_list (void)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 13 of file services_lsb.c.

◆ DESC_MAX

#define DESC_MAX   2048

Definition at line 99 of file services_lsb.c.

◆ DESCRIPTION

#define DESCRIPTION   "# Description:"

Definition at line 69 of file services_lsb.c.

◆ DFLT_START

#define DFLT_START   "# Default-Start:"

Definition at line 66 of file services_lsb.c.

◆ DFLT_STOP

#define DFLT_STOP   "# Default-Stop:"

Definition at line 67 of file services_lsb.c.

◆ LSB_INITSCRIPT_INFOBEGIN_TAG

#define LSB_INITSCRIPT_INFOBEGIN_TAG   "### BEGIN INIT INFO"

Definition at line 59 of file services_lsb.c.

◆ LSB_INITSCRIPT_INFOEND_TAG

#define LSB_INITSCRIPT_INFOEND_TAG   "### END INIT INFO"

Definition at line 60 of file services_lsb.c.

◆ lsb_meta_helper_free_value

#define lsb_meta_helper_free_value (   m)
Value:
do { \
if ((m) != NULL) { \
xmlFree(m); \
(m) = NULL; \
} \
} while(0)

Definition at line 71 of file services_lsb.c.

◆ lsb_metadata_template

#define lsb_metadata_template
Value:
"<?xml version='1.0'?>\n" \
"<!DOCTYPE resource-agent SYSTEM 'ra-api-1.dtd'>\n" \
"<resource-agent name='%s' version='" PCMK_DEFAULT_AGENT_VERSION "'>\n" \
" <version>1.0</version>\n" \
" <longdesc lang='en'>\n" \
"%s" \
" </longdesc>\n" \
" <shortdesc lang='en'>%s</shortdesc>\n" \
" <parameters>\n" \
" </parameters>\n" \
" <actions>\n" \
" <action name='meta-data' timeout='5' />\n" \
" <action name='start' timeout='15' />\n" \
" <action name='stop' timeout='15' />\n" \
" <action name='status' timeout='15' />\n" \
" <action name='restart' timeout='15' />\n" \
" <action name='force-reload' timeout='15' />\n" \
" <action name='monitor' timeout='15' interval='15' />\n" \
" </actions>\n" \
" <special tag='LSB'>\n" \
" <Provides>%s</Provides>\n" \
" <Required-Start>%s</Required-Start>\n" \
" <Required-Stop>%s</Required-Stop>\n" \
" <Should-Start>%s</Should-Start>\n" \
" <Should-Stop>%s</Should-Stop>\n" \
" <Default-Start>%s</Default-Start>\n" \
" <Default-Stop>%s</Default-Stop>\n" \
" </special>\n" \
"</resource-agent>\n"
#define PCMK_DEFAULT_AGENT_VERSION
Definition: services.h:55

Definition at line 25 of file services_lsb.c.

◆ PROVIDES

#define PROVIDES   "# Provides:"

Definition at line 61 of file services_lsb.c.

◆ REQ_START

#define REQ_START   "# Required-Start:"

Definition at line 62 of file services_lsb.c.

◆ REQ_STOP

#define REQ_STOP   "# Required-Stop:"

Definition at line 63 of file services_lsb.c.

◆ SHLD_START

#define SHLD_START   "# Should-Start:"

Definition at line 64 of file services_lsb.c.

◆ SHLD_STOP

#define SHLD_STOP   "# Should-Stop:"

Definition at line 65 of file services_lsb.c.

◆ SHORT_DSCR

#define SHORT_DSCR   "# Short-Description:"

Definition at line 68 of file services_lsb.c.

Function Documentation

◆ services__get_lsb_metadata()

int services__get_lsb_metadata ( const char *  type,
char **  output 
)

Definition at line 102 of file services_lsb.c.

◆ services__list_lsb_agents()

GList* services__list_lsb_agents ( void  )

Definition at line 245 of file services_lsb.c.

◆ services__lsb2ocf()

enum ocf_exitcode services__lsb2ocf ( const char *  action,
int  exit_status 
)

Definition at line 292 of file services_lsb.c.

◆ services__lsb_agent_exists()

bool services__lsb_agent_exists ( const char *  agent)

Definition at line 251 of file services_lsb.c.

◆ services__lsb_prepare()

int services__lsb_prepare ( svc_action_t op)

Definition at line 271 of file services_lsb.c.

◆ services_action_create()

svc_action_t* services_action_create ( const char *  name,
const char *  action,
guint  interval_ms,
int  timeout 
)
Deprecated:
Use resources_action_create() instead

Definition at line 329 of file services_lsb.c.

◆ services_list()

GList* services_list ( void  )
Deprecated:
Use resources_list_agents() instead

Definition at line 337 of file services_lsb.c.