diff --git a/libselinux.changes b/libselinux.changes index 3da3a65..407a06c 100644 --- a/libselinux.changes +++ b/libselinux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 9 07:27:27 UTC 2010 - thomas@novell.com + +- selinux-ready: added function to check for restorecond in + runlevel 3/5 + ------------------------------------------------------------------- Thu Apr 8 06:37:34 UTC 2010 - thomas@novell.com diff --git a/selinux-ready b/selinux-ready index 2d639c6..48b59a3 100644 --- a/selinux-ready +++ b/selinux-ready @@ -160,6 +160,19 @@ check_initupstart() } +check_runlevel() +{ + #ls -q /etc/rc.d/rc[35].d/S*restorecond 1>&2 >/dev/null + + #if [ $? == 0 ]; then + if [ -x /etc/rc.d/rc3.d/S*restorecond ] || [ -x /etc/rc.d/rc5.d/S*restorecond ]; then + printf "\tcheck_runlevel: OK. your system is using restorecond in runlevel 3 and/or 5.\n" + return 0; + fi + printf "\tcheck_runlevel: ERR. please execute 'yast2 runlevel' and enable restorecond.\n" + return 1 +} + check_packages() { PKGLST="checkpolicy policycoreutils selinux-tools libselinux1 libsepol1 libsemanage1 selinux-policy" @@ -211,5 +224,6 @@ check_packages check_config check_initupstart check_pam +check_runlevel rm -rf $TD