#!/bin/sh
#
# $Id: service_active,v 1.4 2003/05/08 16:10:12 jg Exp $
#
#
# Project     :  SCPM (System Configuration Profile Management)
# Module      :  SCPM Utilities
# File        :  service_active
# Description :  Returns active stats of a service
# Author      :  Joachim Gleissner <jg@suse.de>
#
# Copyright 2002 SuSE Linux AG
#
# 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/scpm.conf || exit 1
. $LIBDIR/resource_types/service/common || exit 1

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

LANG=C /sbin/chkconfig --list $1 | awk '{ printf "%s\n%s\n%s\n%s\n%s\n%s\n",$2,$3,$4,$5,$6,$7 }'

exit 0
