On 02/03/2010 01:23 PM, Kaloyan Kovachev wrote:
Hi, thanks for a patch. I just added a test for empty pid file. Feel free to test it, I will add it in main tree in few days.Hi, if the pid file contains more than 1 line (like sendmail) the status_check_pid function returns an error. The attached patch replaces it with 'read pid' like it is done for stop_generic-- Linux-cluster mailing list Linux-cluster@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cluster m, diff --git a/rgmanager/src/resources/utils/ra-skelet.sh b/rgmanager/src/resources/utils/ra-skelet.sh index e892656..5baaaa9 100644 --- a/rgmanager/src/resources/utils/ra-skelet.sh +++ b/rgmanager/src/resources/utils/ra-skelet.sh @@ -14,7 +14,13 @@ status_check_pid() return $OCF_ERR_GENERIC fi - if [ ! -d /proc/`cat "$pid_file"` ]; then + read pid < "$pid_file" + + if [ -z "$pid" ]; then + return $OCF_ERR_GENERIC + fi + + if [ ! -d /proc/$pid ]; then return $OCF_ERR_GENERIC fi |
-- Linux-cluster mailing list Linux-cluster@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cluster