Skip to content

Commit

Permalink
add disable-selinux.
Browse files Browse the repository at this point in the history
  • Loading branch information
hansode committed Mar 15, 2015
1 parent 144d530 commit 4010dd6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions disable-selinux/xexecscript.d/disable-selinux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
#
# requires:
# bash
#
set -e
set -o pipefail

declare chroot_dir=$1

chroot $1 $SHELL -ex <<'EOS'
if [[ -f /etc/selinux/config ]]; then
sed -i "s/^\(SELINUX=\).*/\1disabled/" /etc/selinux/config
egrep ^SELINUX= /etc/selinux/config
fi
EOS

0 comments on commit 4010dd6

Please sign in to comment.