Support init.d-using services in os-svc-enable

os-svc-enable-upstart currently only works for Upstart scripts,
and will print a warning that the job doesn't exist, and then
create an .enable file anyway. If the action is enable, and the
Upstart config file doesn't exist, but the initscript does, run
update-rc.d.

Change-Id: Ib1e3d4e2963dd2ce4d96078781a929205c25d886
Add detection of mysql restart failure

The present script that is put in place to handle restarts of mysql,
returns an exit code of 0 when a restart has failed as the return
code from start is not captured inside the restart sequence.

This change updates the logic in the script to detect the restart
failure and exit the script with an exit code of 1. If the logic
is already found, the script prints a warning.

Filed with Percona:
https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1339894

Change-Id: Ifdbaa11010cf19ab53c5d2fe4bbec186e58fe6dc
Closes-Bug: 1337344
Merge "Add detection of mysql restart failure"
Merge "Support init.d-using services in os-svc-enable"