3 # broken check with --pidfile specified:
5 # $ (. /etc/rc.d/init.d/functions; status --pidfile /var/run/naviagent/agent.pid naviagent)
6 # naviagent (pid 12788) is running...
8 # $ ls -l /proc/`cat /var/run/naviagent/agent.pid`
9 # ls: cannot access /proc/12788: No such file or directory
11 lib=$(dirname "$0")/..
14 # TODO: rc_cache_init should be able to use tmp dir, not real root
18 pid=9999999 # may not exist
19 procname=testd # irrelevant
20 pidfile=$tmp/agent.pid
22 if [ -d /proc/$pid ]; then
23 echo >&2 "bad pid chosen for test, /proc/$pid exists"
28 status --pidfile $pidfile $procname
31 echo "FAIL: should not say process is running"
34 echo "OK: process is not running"