| 1 | # Copyright 1999-2006 Gentoo Foundation |
1 | # Copyright 1999-2006 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.5 2011/02/05 11:28:10 blueness Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.6 2011/05/20 19:06:07 blueness Exp $ |
| 4 | |
4 | |
| 5 | # Eclass for installing SELinux policy, and optionally |
5 | # Eclass for installing SELinux policy, and optionally |
| 6 | # reloading the reference-policy based modules. |
6 | # reloading the reference-policy based modules. |
| 7 | |
7 | |
| 8 | inherit eutils |
8 | inherit eutils |
| … | |
… | |
| 83 | |
83 | |
| 84 | for i in ${POLICY_TYPES}; do |
84 | for i in ${POLICY_TYPES}; do |
| 85 | einfo "Inserting the following modules into the $i module store: ${MODS}" |
85 | einfo "Inserting the following modules into the $i module store: ${MODS}" |
| 86 | |
86 | |
| 87 | cd /usr/share/selinux/${i} |
87 | cd /usr/share/selinux/${i} |
| 88 | semodule -s ${i} ${COMMAND} |
88 | semodule -s ${i} ${COMMAND} || die "Failed to load in modules ${MODS} in the $i policy store" |
| 89 | done |
89 | done |
| 90 | } |
90 | } |
| 91 | |
91 | |
| 92 | EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst |
92 | EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst |