Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9ba... Commit: 9ba679c621535abc7fbf626fdff50377a072404d Parent: 917b27d7ad45e4e4fa22bcc1e5255075aee0b49b Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Wed Feb 17 12:23:07 2010 +0100 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Wed Feb 17 12:26:55 2010 +0100
resource agents: Handle multiline pid files
if the pid file contains more than 1 line (like sendmail) the status_check_pid function returns an error.
Patch by Kaloyan Kovachev --- rgmanager/src/resources/utils/ra-skelet.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
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
cluster-commits@lists.fedorahosted.org