From ba34ae5a178ff5b2a184f54f7e9d5d59fd9f03ec Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 14 Oct 2018 11:22:45 +0100 Subject: sys-fs/cryptsetup : add openrc parts --- packages/sys-fs/cryptsetup/cryptsetup-1.7.5.exheres-0 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'packages/sys-fs/cryptsetup/cryptsetup-1.7.5.exheres-0') diff --git a/packages/sys-fs/cryptsetup/cryptsetup-1.7.5.exheres-0 b/packages/sys-fs/cryptsetup/cryptsetup-1.7.5.exheres-0 index 65f6cec..363457c 100644 --- a/packages/sys-fs/cryptsetup/cryptsetup-1.7.5.exheres-0 +++ b/packages/sys-fs/cryptsetup/cryptsetup-1.7.5.exheres-0 @@ -3,6 +3,8 @@ # Copyright 2011-2012 Wulf C. Krueger # Distributed under the terms of the GNU General Public License v2 +require openrc-service + SUMMARY="Userland utilities for dm-crypt" HOMEPAGE="https://gitlab.com/${PN}/${PN}" DOWNLOADS="mirror://kernel/linux/utils/${PN}/v$(ever range 1-2)/${PNV}.tar.xz" @@ -71,3 +73,20 @@ src_configure() { fi) } +src_install() { + default + + install_openrc_files +} + +pkg_preinst() { + if [[ -f ""${ROOT}"etc/conf.d/dmcrypt" ]]; then + edo mv ""${ROOT}"etc/conf.d/dmcrypt" ""${ROOT}"etc/conf.d/dmcrypt.bak" + fi +} + +pkg_postinst() { + if [[ -f ""${ROOT}"etc/conf.d/dmcrypt.bak" ]]; then + edo mv ""${ROOT}"etc/conf.d/dmcrypt.bak" ""${ROOT}"etc/conf.d/dmcrypt" + fi +} -- cgit v1.2.3