Bug 463205
| Summary: | mistake in /etc/init.d/functions file's status function | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Balazs Zachar <balazs.zachar> |
| Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> |
| Status: | CLOSED DUPLICATE | QA Contact: | BaseOS QE <qe-baseos-auto> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.2 | CC: | notting |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-09-24 14:15:35 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Balazs Zachar
2008-09-22 15:36:50 UTC
# Find pid.
__pids_var_run "$1" "$pid_file"
if [ -z "$pid_file" -a -z "$pid" ]; then
pid="$(__pids_pidof "$1")"
fi
I'm confused - how is this not using the pidfile?
(In reply to comment #1) > # Find pid. > __pids_var_run "$1" "$pid_file" > if [ -z "$pid_file" -a -z "$pid" ]; then > pid="$(__pids_pidof "$1")" > fi > > I'm confused - how is this not using the pidfile? I had problem with the status function not with the killproc... (killproc works fine) status function's begin: status() { local base pid pid_file= # Test syntax. if [ "$#" = 0 ] ; then echo $"Usage: status [-p pidfile] {program}" return 1 fi if [ "$1" = "-p" ]; then pid_file=$2 shift 2 fi base=${1##*/} # First try "pidof" pid="$(__pids_pidof "$1")" if [ -n "$pid" ]; then echo $"${base} (pid $pid) is running..." return 0 fi Here, you first try the pidof before you use the pidfile to determine the process's pid. So, pidof find the A process's pid and give me the A process's status instead of B. *** This bug has been marked as a duplicate of bug 440658 *** |