#!/bin/sh
#
# $Id: service_status,v 1.2 2005/12/13 16:30:15 gleissner Exp $
#
#
# Project     :  SCPM (System Configuration Profile Management)
# Module      :  SCPM Utilities
# File        :  service_status
# Description :  Returns status of a service using the given init script
# Author      :  Joachim Gleissner <jg@suse.de>
#
# Copyright 2001 SuSE GmbH
#
# Released under the terms of the GNU General Public License
# (see file COPYRIGHT in project root directory).
#

test -z "$1" && { echo "no init script given" >&2 ; exit 1 ; }

. /etc/sysconfig/scpm || exit 1
. $LIBDIR/resource_types/service/common || exit 1

test -f $INITD/$1 || { echo "no such file $INITD/$1" >&2 ; exit 2 ; }

PATH=/sbin:$PATH
exec $INITD/$1 status


exit 0
    
