aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/functions
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d/functions')
-rwxr-xr-xrc.d/init.d/functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 3922af3a..11dea408 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -198,7 +198,7 @@ pidofproc() {
# First try "/var/run/*.pid" files
if [ -f /var/run/${base}.pid ] ; then
- pid=`head -1 /var/run/${base}.pid`
+ pid=`cat /var/run/${base}.pid | { read foo ; echo $foo ; }`
if [ "$pid" != "" ] ; then
echo $pid
return 0
@@ -231,7 +231,7 @@ status() {
# Next try "/var/run/*.pid" files
if [ -f /var/run/${base}.pid ] ; then
- pid=`head -1 /var/run/${base}.pid`
+ pid=`cat /var/run/${base}.pid | { read foo ; echo $foo ; }`
if [ "$pid" != "" ] ; then
echo "${base} dead but pid file exists"
return 1