changed deprecated 'tail -1' to 'tail -n 1'; the Java Service Wrapper team will probably change it soon, but we need this for 0.4

This commit is contained in:
hypercubus
2004-08-29 17:59:10 +00:00
committed by zzz
parent f68271c3d7
commit 944d467654

View File

@ -126,7 +126,7 @@ getpid() {
if [ "X$pid" != "X" ] if [ "X$pid" != "X" ]
then then
# Verify that a process with this pid is still running. # Verify that a process with this pid is still running.
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -n 1`
if [ "X$pid" = "X" ] if [ "X$pid" = "X" ]
then then
# This is a stale pid file. # This is a stale pid file.
@ -142,7 +142,7 @@ getpid() {
} }
testpid() { testpid() {
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -n 1`
if [ "X$pid" = "X" ] if [ "X$pid" = "X" ]
then then
# Process is gone so remove the pid file. # Process is gone so remove the pid file.