From b64d57aac841cb0a569e9651cba629965d1e6783 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 30 Jun 2010 20:37:43 +0200 Subject: [PATCH] Default all processes to run with nice=0. This should work much better for the CFS --- src/initscripts/init.d/functions | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/initscripts/init.d/functions b/src/initscripts/init.d/functions index ea840d1a56..00cd6fa2a1 100644 --- a/src/initscripts/init.d/functions +++ b/src/initscripts/init.d/functions @@ -438,7 +438,7 @@ loadproc() { local pidfile="" local forcestart="" - local nicelevel="10" + local nicelevel="" # This will ensure compatibility with previous LFS Bootscripts if [ -n "${PIDFILE}" ]; then @@ -500,7 +500,13 @@ loadproc() esac fi - nice -n "${nicelevel}" "${@}" + local cmd="${@}" + + if [ -n "${nicelevel}" ]; then + cmd="nice -n "${nicelevel}" ${cmd}" + fi + + ${cmd} evaluate_retval # This is "Probably" not LSB compliant, but required to be compatible with older bootscripts return 0 } -- 2.39.2