Skip to content

RHEL6: Machine Agent - daemon() function not in /lib/lsb/init-functions #87

@rediculum

Description

@rediculum

Hello

The init script of /etc/init.d/appdynamics_machine_agent sources different init functions. On RHEL 6 the daemon() function in /lib/lsb/init-functions is not present. Instead its called start_daemon().

# grep daemon /lib/lsb/init-functions
start_daemon () {
	/etc/redhat-lsb/lsb_start_daemon "$@"

This leads to a problem using the init script:

# bash -x /etc/init.d/appdynamics_machine_agent start
+ '[' -r /lib/lsb/init-functions ']'
+ . /lib/lsb/init-functions
+ INSTALL_DIR=/opt/appdynamics/machineagent
+ RETVAL=0
+ PROG=/opt/appdynamics/machineagent/run.sh
+ pid_file=/var/run/appdynamics_machine_agent.pid
+ case "$1" in
+ start
+ echo -n 'Starting AppDynamics machine agent:'
Starting AppDynamics machine agent:+ daemon --pidfile=/var/run/appdynamics_machine_agent.pid /opt/appdynamics/machineagent/run.sh
/etc/init.d/appdynamics_machine_agent: line 25: daemon: command not found
+ RETVAL=127
+ echo

+ exit 127

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions