Pure-FTPd RA script does not create the pid directory

Bug #1017406 reported by Nicola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cluster-agents (Ubuntu)
New
Undecided
Unassigned

Bug Description

Actually Pure-FTPd ra script does not work out of box on ubuntu, this is for the following reasons:

- pid file in pure-ftpd wrapper is hard coded in /usr/sbin/pure-ftpd-wrapper on line 173:

push(@options, '-g', '/var/run/pure-ftpd/pure-ftpd.pid');

- the directory /var/run/pure-ftpd is deleted on each reboot
- the init script for pure-ftpd create the directory
- the ra script does not create that directory and so fails to start pure-ftpd

there are the following solutions:

1) add something like this:

if [ ! -d `dirname $OCF_RESKEY_pidfile` ];then
        mkdir `dirname $OCF_RESKEY_pidfile`
fi

at the beginning of the start function in the RA script

2) add something like this:

mkdir "/var/run/pure-ftpd", 0700 unless -d "/var/run/pure-ftpd";

after line 173 in the pure-ftpd wrapper script

3) change the wrapper script to make pid location configurable, so ra script can use a different pid file (probably require modifications to the ra script too)
4) make pure-ftpd init script lsb compliant and use it as lsb resource in pacemaker
5) make pure-ftpd init script upstart compliant and use it as upstart resource in pacemaker

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.