Skip to content
Snippets Groups Projects
Commit 24966580 authored by Jean-Damien Durand's avatar Jean-Damien Durand Committed by Steven Murray
Browse files

grep " 1 program" -> egrep " 1 program\$"

parent e9723cef
Branches
Tags
No related merge requests found
......@@ -5,9 +5,9 @@
# chkconfig: 345 71 34
# description: RMC server daemon
#
# $Id: rmcdaemon.init,v 1.2 2005/11/30 09:06:00 jdurand Exp $
# $Id: rmcdaemon.init,v 1.3 2005/11/30 09:14:52 jdurand Exp $
#
# @(#)$RCSfile: rmcdaemon.init,v $ $Revision: 1.2 $ $Date: 2005/11/30 09:06:00 $ CERN/IT/ADC/CA Jean-Damien Durand
# @(#)$RCSfile: rmcdaemon.init,v $ $Revision: 1.3 $ $Date: 2005/11/30 09:14:52 $ CERN/IT/ADC/CA Jean-Damien Durand
#
sysname=`uname -s`
......@@ -116,7 +116,7 @@ case "$1" in
if [ $? -eq 0 ]; then
[ -d $SUBSYSDIR ] && touch $SUBSYS
if [ -d $PIDDIR ]; then
pid=`ps -eo pid,ppid,$format4comm | grep " 1 rmcdaemon" | awk '{print $1}'`
pid=`ps -eo pid,ppid,$format4comm | egrep " 1 rmcdaemon\$" | awk '{print $1}'`
# The point of $PIDFILE is that it kills only
# the master daemon.
rm -f $PIDFILE
......@@ -154,7 +154,7 @@ case "$1" in
fi
else
# rmcdaemon might have been started by hand
pid=`ps -eo pid,ppid,$format4comm | grep " 1 rmcdaemon" | awk '{print $1}'`
pid=`ps -eo pid,ppid,$format4comm | egrep " 1 rmcdaemon\$" | awk '{print $1}'`
if [ -n "$pid" ]; then
[ $SILENTSTOP -eq 0 ] && echo $ECHOOPT "Stopping $prog: "
if [ $SILENTSTOP -eq 0 ]; then
......@@ -216,7 +216,7 @@ case "$1" in
RETVAL=$?
;;
status)
pid=`ps -eo pid,ppid,$format4comm | grep " 1 rmcdaemon" | awk '{print $1}' | head -1`
pid=`ps -eo pid,ppid,$format4comm | egrep " 1 rmcdaemon\$" | awk '{print $1}' | head -1`
if [ -n "$pid" ]; then
echo $ECHOOPT "rmcdaemon (pid $pid) is running..."
$ECHO_SUCCESS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment