Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430988 - sys-apps/preload-0.6.4-r2 init script does not execute ionice properly
Summary: sys-apps/preload-0.6.4-r2 init script does not execute ionice properly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-08-11 18:45 UTC by Krzysztof Magusiak
Modified: 2012-09-14 19:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Magusiak 2012-08-11 18:45:37 UTC
In the /etc/init.d/preload file, the check to avoid 'ionice not found' errors always fails even if ionice is present. The reason is that it is not used properly.

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/preload start
2. ionice -p $(pgrep preload)
Actual Results:  
ionice output is `unknown: prio 0` instead of `idle`


This can be fixed by replacing in the /etc/init.d/preload file in function start() the line:

  ${ionice:-true} >/dev/null 2>&1 || continue

with

  ${ionice} true >/dev/null 2>&1 || continue

The original line executes by default `ionice -c3` without giving any pid or command which results printing the usage and exiting with code 1.
Comment 1 Pacho Ramos gentoo-dev 2012-09-14 19:15:06 UTC
+*preload-0.6.4-r3 (14 Sep 2012)
+
+  14 Sep 2012; Pacho Ramos <pacho@gentoo.org> +files/preload-0.6.4.init.in-r2,
+  +preload-0.6.4-r3.ebuild:
+  Execute ionice properly, bug #430988 by Krzysztof Magusiak.
+