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
This commit is contained in:
JUN JIE NAN 2013-12-03 15:35:49 +08:00
parent 255387a288
commit d7e43c0861

View File

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