From a5a1d6fe449dab696360a8f40184a7d9d0db5aea Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 4 May 2009 23:26:02 +0200 Subject: [PATCH] metalog: use $openrc_services and its trigger. --HG-- extra : convert_revision : b6512fcee0584b8c8052e8504ef2fe6a15a88236 --- templates/metalog/INSTALL | 20 -------------------- templates/metalog/REMOVE | 20 -------------------- templates/metalog/template | 3 +++ 3 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 templates/metalog/INSTALL delete mode 100644 templates/metalog/REMOVE diff --git a/templates/metalog/INSTALL b/templates/metalog/INSTALL deleted file mode 100644 index 97502a77a6..0000000000 --- a/templates/metalog/INSTALL +++ /dev/null @@ -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 diff --git a/templates/metalog/REMOVE b/templates/metalog/REMOVE deleted file mode 100644 index 950cb99a3d..0000000000 --- a/templates/metalog/REMOVE +++ /dev/null @@ -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 diff --git a/templates/metalog/template b/templates/metalog/template index 92f01f4fbd..33ef35e4f8 100644 --- a/templates/metalog/template +++ b/templates/metalog/template @@ -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() {