Bug 1721
| Summary: | annoying shell script /etc/rc.d/init.d/functions | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | president |
| Component: | aboot | Assignee: | David Lawrence <dkl> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.2 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 1999-03-24 14:11:38 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: | |||
I really don't know why I should help since you guys seem to becoming half MicroSoft and have open source in your mentality, but just because you guys have been good in the past, am I willing to help you fix a brain dead mistake. You should check to see if $2 is equal to null first before using it in /etc/rc.d/init.d/functions Change =============================== else [ "$2" != "" ] pid=`ps auxww | grep '[^[]'$1 | awk '{print $2}'` if [ "$pid" != "" ] ; then echo "$1 $2 (pid $pid) is running..." return 0 fi fi =========================== to ========================= elseif [ "$2" != "" ] pid=`ps auxww | grep '[^[]'$1 | awk '{print $2}'` if [ "$pid" != "" ] ; then echo "$1 $2 (pid $pid) is running..." return 0 fi fi ==========================