Skip to content

Commit

Permalink
WIP - Don't semanage on install, cleanup /run/containerd
Browse files Browse the repository at this point in the history
  • Loading branch information
erikwilson committed Feb 21, 2020
1 parent f544a64 commit cd6778f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,15 @@ setup_binary() {
$SUDO chown root:root ${TMP_BIN}
$SUDO mv -f ${TMP_BIN} ${BIN_DIR}/k3s

if command -v getenforce > /dev/null 2>&1; then
if [ "Disabled" != $(getenforce) ]; then
info 'SELinux is enabled, setting permissions'
if ! $SUDO semanage fcontext -l | grep "${BIN_DIR}/k3s" > /dev/null 2>&1; then
$SUDO semanage fcontext -a -t bin_t "${BIN_DIR}/k3s"
fi
$SUDO restorecon -v ${BIN_DIR}/k3s > /dev/null
fi
fi
# if command -v getenforce > /dev/null 2>&1; then
# if [ "Disabled" != $(getenforce) ]; then
# info 'SELinux is enabled, setting permissions'
# if ! $SUDO semanage fcontext -l | grep "${BIN_DIR}/k3s" > /dev/null 2>&1; then
# $SUDO semanage fcontext -a -t bin_t "${BIN_DIR}/k3s"
# fi
# $SUDO restorecon -v ${BIN_DIR}/k3s > /dev/null
# fi
# fi
}

# --- download and verify k3s ---
Expand Down Expand Up @@ -520,6 +520,7 @@ do_unmount() {
}
do_unmount '/run/k3s'
do_unmount '/run/containerd'
do_unmount '/var/lib/rancher/k3s'
do_unmount '/var/lib/kubelet/pods'
do_unmount '/run/netns/cni-'
Expand Down

0 comments on commit cd6778f

Please sign in to comment.