From 7090f2ca9f1392da15cf0770b2af7433d9cc05e3 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 5 Aug 2013 17:39:27 -0700 Subject: [PATCH] Ensure we chcon for redhat like distros Change-Id: I1660cacefabd416934b41177d65b42a42a269686 --- smithy | 11 +++++++++++ tools/bootstrap/CommonRedHat | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/smithy b/smithy index 4340b719..da22a220 100755 --- a/smithy +++ b/smithy @@ -138,6 +138,17 @@ for pkg in packages: fi } +bootstrap_selinux() +{ + # See if selinux is on. + if [ `getenforce` == "Enforcing" ]; then + # Ensure all yum api interacting binaries are ok to be used + echo "Enabling selinux for yum like binaries." + chcon -h "system_u:object_r:rpm_exec_t:s0" "$YUMFIND_CMD" + chcon -h "system_u:object_r:rpm_exec_t:s0" "$PWD/tools/yyoom" + fi +} + bootstrap_python_rpms() { local package_map=$(python -c "import yaml diff --git a/tools/bootstrap/CommonRedHat b/tools/bootstrap/CommonRedHat index 69f37af3..6976e2f3 100644 --- a/tools/bootstrap/CommonRedHat +++ b/tools/bootstrap/CommonRedHat @@ -1,5 +1,5 @@ # -*- sh -*- -STEPS="epel rpm_packages python_rpms" +STEPS="selinux epel rpm_packages python_rpms" EPEL_RPM_URL="http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm" DISTRO_CONFIG=conf/distros/rhel.yaml