realtime-setup/realtime-setup.systemd
Clark Williams 684db02d31 initial checkin for rawhide
Signed-off-by: Clark Williams <williams@redhat.com>
2023-07-05 08:19:59 -05:00

35 lines
626 B
Bash
Executable File

#!/usr/bin/bash
on_rt () {
if [ -f /sys/kernel/realtime ]; then
return 0
fi
return 1
}
prog="rt-setup"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
# is this a rhel-rt kernel?
if ! on_rt; then
echo "Not running on a RHEL-RT kernel!"
exit 0
fi
# make sure that cpusets are mounted
if ! grep cpuset /proc/mounts >/dev/null 2>&1; then
echo "cpusets not mounted!"
exit 2
fi
# if not running, start it up here, usually something like "daemon $exec"
if [ "$SLUB_CPU_PARTIAL" == "off" ]; then
slub_cpu_partial_off
slub_retval=$?
else
slub_retval=0
fi
exit $slub_retval