diskimage-builder/elements/disable-selinux/post-install.d/15-disable-selinux
JUN JIE NAN d7e43c0861 Modify /etc/selinux/config if it exists
When `/etc/selinux/config' does not exist, although selinux has
already been disabled, the image creation will fail.

Change-Id: I9e4a9a006073fd3f708049407ef98f82c3f399d1
2013-12-03 15:35:49 +08:00

5 lines
115 B
Bash
Executable File

#!/bin/bash
config=/etc/selinux/config
[ -e $config ] && sed -i "s%^\(SELINUX=\s*\).*$%SELINUX=disabled%" $config