readahead-fedora (2:1.5.6-4) no_dependency_on_ionice.patch

Summary

 scripts/readahead.cron |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

Index: readahead/scripts/readahead.cron
===================================================================
--- readahead.orig/scripts/readahead.cron
+++ readahead/scripts/readahead.cron
@@ -7,13 +7,16 @@
 # Karel Zak <kzak@redhat.com>
 #
 
-renice +19 -p $$ >/dev/null 2>&1
-ionice -c3 -p $$ >/dev/null 2>&1
-
 TYPES="early later"
 READAHEAD_CMD="/sbin/readahead"
 READAHEAD_BASE="/var/lib/readahead"
 
+if [ -z "$RENICED" ]; then
+    export RENICED=yes
+    exec /sbin/start-stop-daemon --start -N +19 -I idle \
+	    --exec $READAHEAD_CMD --startas $0
+fi
+
 for LTYPE in $TYPES; do
 	if [ -s "$READAHEAD_BASE/custom.$LTYPE" ]; then
 		FLS="$READAHEAD_BASE/custom.$LTYPE"