/lib/live/debconfig/0100-selinux is in live-debconfig 4.0~alpha31-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | #!/bin/sh
## live-debconfig(7) - System Configuration Components
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
set -e
DEBCONF_SYSTEMRC="/var/lib/live/debconfig/systemrc"
export DEBCONF_SYSTEMRC
. /usr/share/debconf/confmodule
if [ -e /selinux ]
then
# squeeze
_SELINUXFS="/selinux"
else
# wheezy and newer
_SELINUXFS="/sys/fs/selinux"
fi
Defaults ()
{
if [ -z "${_SELINUX_ENABLE}" ]
then
if [ -n "$(cat ${_SELINUXFS}/enforce 2> /dev/null)" ]
then
case "$(cat ${_SELINUXFS}/enforce 2> /dev/null)" in
0)
_SELINUX_ENABLE="false"
;;
1)
_SELINUX_ENABLE="true"
;;
esac
else
_SELINUX_ENABLE="false"
fi
fi
}
db_get live-debconfig/selinux/enable
_SELINUX_ENABLE="${RET}" # boolean
Defaults
db_set live-debconfig/selinux/enable "${_SELINUX_ENABLE}"
db_fset live-debconfig/selinux/enable seen false
db_settitle live-debconfig/title
db_input high live-debconfig/selinux/enable || true
db_go
db_get live-debconfig/selinux/enable
_SELINUX_ENABLE="${RET}" # boolean
Defaults
db_stop
case "${_SELINUX_ENABLE}" in
true)
rm -f "${_SELINUXFS}/enforce"
rmdir --ignore-fail-on-non-empty "${_SELINUXFS}" > /dev/null 2>&1 || true
;;
false)
mkdir -p "${_SELINUXFS}"
echo 0 > "${_SELINUXFS}/enforce.tmp"
mv "${_SELINUXFS}/enforce.tmp" "${_SELINUXFS}/enforce"
;;
esac
|