| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/init/ |
Upload File : |
# readahead - readahead
#
# Starts readahead
start on startup
stop on started rc RUNLEVEL=[016]
console output
script
# do not exit on failed commands
set +e
. /etc/sysconfig/readahead
. /etc/init.d/functions
cmdline=$(cat /proc/cmdline)
check_autorelabel()
{
if [ -f /.autorelabel ] || strstr "$cmdline" autorelabel; then
# Check SELinux status
selinuxfs="$(fstab_decode_str `LC_ALL=C awk '/ selinuxfs / { print $2 }' /proc/mounts`)"
SELINUX_STATE=
if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then
if [ -r "$selinuxfs/enforce" ] ; then
SELINUX_STATE=`cat "$selinuxfs/enforce"`
else
# assume enforcing if you can't read it
SELINUX_STATE=1
fi
fi
if [ -n "$SELINUX_STATE" ]; then
return 0
fi
fi
return 1
}
[ -f /.autofsck ] && exit 0
[ -f /forcefsck ] && exit 0
[ "$READAHEAD" != "yes" ] && exit 0
[ -f /var/lib/readahead/early.sorted ] || exit 0
[ -f /.readahead_collect ] && exit 0
if [ "$READAHEAD_COLLECT_ON_RPM" = "yes" ]; then
[ /var/lib/readahead/early.sorted -nt /var/lib/rpm/Packages ] || exit 0
fi
# Check for enough memory
read label val rest < /proc/meminfo
[ "$rest" = "kB" -a $val -gt ${READAHEAD_MIN_MEM:-393216} ] || exit 0
check_autorelabel && exit 0
try=0
while [ $try -lt 10 ]; do
if test -d /usr/sbin; then
try=10
else
try=$(($try+1))
sleep 1
fi
done
echo "<6>readahead: starting" > /dev/kmsg
exec /sbin/readahead --dont-sort /var/lib/readahead/early.sorted
end script