CP-5737: Avoid to mix different types during checks.

'f' was either integer or fileobject, this could cause type errors, use None
to have always an object.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Find proper lvm tools directory

Directory is /usr/bin or /sbin base on distro (CentOS 6.4 uses /sbin).

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Add a function to silently ignore no present error deleting file

This function is useful to delete a file/directory and avoiding race
conditions if another process/thread do the same thing.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Ignore error deleting LVM files if file is not present anymore.

LVM seems to remove files faster then SM so trying to delete LVM files
ignore error if file was not present.
Catch ENOENT error instead of checking for existence before to avoid race
conditions and limiting system calls.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
CP-5737: Do not use /etc/init.d scripts but service instead.

To be compatible with upstart is better to start services using service
command.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>