diff options
-rw-r--r-- | rc.d/init.d/functions | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 82590a16..c8870d3a 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -386,7 +386,7 @@ pidofproc() { } status() { - local base pid pid_file= + local base pid lock_file= pid_file= # Test syntax. if [ "$#" = 0 ] ; then @@ -397,6 +397,10 @@ status() { pid_file=$2 shift 2 fi + if [ "$1" = "-l" ]; then + lock_file=$2 + shift 2 + fi base=${1##*/} # First try "pidof" @@ -420,8 +424,11 @@ status() { return 1 ;; esac - # See if /var/lock/subsys/${base} exists - if [ -f /var/lock/subsys/${base} ]; then + if [ -z "${lock_file}" ]; then + lock_file=${base} + fi + # See if /var/lock/subsys/${lock_file} exists + if [ -f /var/lock/subsys/${lock_file} ]; then echo $"${base} dead but subsys locked" return 2 fi |