1 |
commit: 3c5f2f67bbb75895798b3efb0fd7811d2447bf15 |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Wed Aug 3 11:23:23 2011 +0000 |
4 |
Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
5 |
CommitDate: Wed Aug 3 11:23:23 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=3c5f2f67 |
7 |
|
8 |
Add die statements where appropriate. Thanks to Peter Volkov (pva <AT> g.o) |
9 |
|
10 |
--- |
11 |
eclass/selinux-policy-2.eclass | 10 ++++++---- |
12 |
1 files changed, 6 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass |
15 |
index 83ac176..423553a 100644 |
16 |
--- a/eclass/selinux-policy-2.eclass |
17 |
+++ b/eclass/selinux-policy-2.eclass |
18 |
@@ -136,10 +136,12 @@ selinux-policy-2_src_prepare() { |
19 |
done |
20 |
|
21 |
for i in ${POLICY_TYPES}; do |
22 |
- mkdir "${S}"/${i} |
23 |
- cp "${S}"/refpolicy/doc/Makefile.example "${S}"/${i}/Makefile |
24 |
+ mkdir "${S}"/${i} || die "Failed to create directory ${S}/${i}" |
25 |
+ cp "${S}"/refpolicy/doc/Makefile.example "${S}"/${i}/Makefile \ |
26 |
+ || die "Failed to copy Makefile.example to ${S}/${i}/Makefile" |
27 |
|
28 |
- cp ${modfiles} "${S}"/${i} |
29 |
+ cp ${modfiles} "${S}"/${i} \ |
30 |
+ || die "Failed to copy the module files to ${S}/${i}" |
31 |
done |
32 |
} |
33 |
|
34 |
@@ -183,7 +185,7 @@ selinux-policy-2_pkg_postinst() { |
35 |
for i in ${POLICY_TYPES}; do |
36 |
einfo "Inserting the following modules into the $i module store: ${MODS}" |
37 |
|
38 |
- cd /usr/share/selinux/${i} |
39 |
+ cd /usr/share/selinux/${i} || die "Could not enter /usr/share/selinux/${i}" |
40 |
semodule -s ${i} ${COMMAND} || die "Failed to load in modules ${MODS} in the $i policy store" |
41 |
done |
42 |
} |