#!/bin/sh
#
# $Id: service_get_provides,v 1.2 2002/08/20 10:41:38 jg Exp $
#
#
# Project     :  SCPM (System Configuration Profile Management)
# Module      :  SCPM Utilities
# File        :  service_get_provides
# Description :  Prints provided services for 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).
#

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

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

while read LINE ; do
    FOO="${LINE#\# Provides:}"
    test "$FOO" != "$LINE" && { echo $FOO | tr ' ' '\n' ; break ; }
done < $INITD/$1

exit 0
