metalog: use $openrc_services and its trigger.

--HG--
extra : convert_revision : b6512fcee0584b8c8052e8504ef2fe6a15a88236
This commit is contained in:
Juan RP 2009-05-04 23:26:02 +02:00
parent 21f2782f99
commit a5a1d6fe44
3 changed files with 3 additions and 40 deletions

View File

@ -1,20 +0,0 @@
#
# This script registers the metalog service into the
# 'default' runlevel, as required by OpenRC.
#
case "${ACTION}" in
pre)
;;
post)
[ ! -x sbin/rc-update ] && exit 0
[ ! -x sbin/rc-service ] && exit 0
if sbin/rc-service -e ${PKGNAME}; then
echo "Registering ${PKGNAME} OpenRC service..."
sbin/rc-update add ${PKGNAME} default
[ $? -ne 0 ] && exit $?
sbin/rc-update -u
fi
;;
esac

View File

@ -1,20 +0,0 @@
#
# This script unregisters the metalog service from the
# 'default' runlevel, as required by OpenRC.
#
case "${ACTION}" in
pre)
[ ! -x sbin/rc-update ] && exit 0
[ ! -x sbin/rc-service ] && exit 0
if sbin/rc-service -e ${PKGNAME}; then
echo "Unregistering ${PKGNAME} OpenRC service..."
sbin/rc-update del ${PKGNAME} default
[ $? -ne 0 ] && exit $?
sbin/rc-update -u
fi
;;
post)
;;
esac

View File

@ -14,11 +14,14 @@ long_desc="
and/or Perl-compatible regular expressions."
conf_files="/etc/metalog.conf"
openrc_services="metalog default"
triggers="openrc-service"
Add_dependency full glibc
Add_dependency full pcre
Add_dependency full bzip2
Add_dependency build lzma-utils
Add_dependency run OpenRC
post_install()
{