diff options
author | David P <megver83@openmailbox.org> | 2017-03-21 12:31:55 -0300 |
---|---|---|
committer | David P <megver83@openmailbox.org> | 2017-03-21 12:31:55 -0300 |
commit | ea46feb5ac2b4499c7bb61fe3c284855bf6ee33b (patch) | |
tree | aa78b0742a8ab8397f6fa5ea86e35261e19f09e4 /pcr | |
parent | 0717513e8692a0b1602254e820fa57fef423a349 (diff) | |
download | abslibre-ea46feb5ac2b4499c7bb61fe3c284855bf6ee33b.tar.gz abslibre-ea46feb5ac2b4499c7bb61fe3c284855bf6ee33b.tar.bz2 abslibre-ea46feb5ac2b4499c7bb61fe3c284855bf6ee33b.zip |
Added apparmor-openrc to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/apparmor-openrc/PKGBUILD | 32 | ||||
-rw-r--r-- | pcr/apparmor-openrc/apparmor.install | 12 |
2 files changed, 44 insertions, 0 deletions
diff --git a/pcr/apparmor-openrc/PKGBUILD b/pcr/apparmor-openrc/PKGBUILD new file mode 100644 index 000000000..c58914aff --- /dev/null +++ b/pcr/apparmor-openrc/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: David P. <megver83@openmailbox.org> + +pkgname=apparmor-openrc +pkgver=20160816 +pkgrel=1 +pkgdesc="OpenRC apparmor init script" +arch=('any') +url="http://apparmor.net/" +license=('GPL2') +depends=('apparmor' 'openrc') +install='apparmor.install' +_filename='apparmor-init' +source=("https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-apps/apparmor/files/$_filename") +sha256sums=('f1c9ef2737012475f7fe7b943533b5d9345df1814a16a5c8d1929d835482f802') + +pkgver() { + date +%Y%m%d +} + +_inst_initd(){ + install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1 + + sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \ + -e 's|/var/run|/run|g' \ + -i "${pkgdir}/etc/init.d/$1" + # ^^--- should work without this, but actually does not (at boot) +} + +package() { + mv "$_filename" -v apparmor.initd + _inst_initd 'apparmor' +} diff --git a/pcr/apparmor-openrc/apparmor.install b/pcr/apparmor-openrc/apparmor.install new file mode 100644 index 000000000..a59542111 --- /dev/null +++ b/pcr/apparmor-openrc/apparmor.install @@ -0,0 +1,12 @@ +_svc="apparmor" +_rlvl="boot" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} |