Bug 641586

Summary: In all ktune.sh scripts of tuned, hal-disable-polling coredumps if there is no cdrom drive.
Product: [Fedora] Fedora Reporter: Erwan LE PENNEC <lepennec>
Component: tunedAssignee: Jan Vcelak <jvcelak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: jvcelak, mmaslano, pknirsch, plautrba, tsmetana, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tuned-0.2.18-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-07 20:10:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Erwan LE PENNEC 2010-10-09 12:18:14 UTC
Description of problem: 
In all ktune.sh scripts of tuned (located in /etc/tune-profiles/*), hal-disable-polling coredumps if there is no cdrom drive.

Version-Release number of selected component (if applicable):
0.2.17 1.fc13

How reproducible:
Each time

Steps to Reproduce:
1. launch "tuned-adm profile laptop-battery-powersave" on a computer without cdrom drive...

  
Actual results/ Expected results / Additional info
hal-disable-polling coredumps... which should not be the case...

The issue is simple: the scripts behave badly when there is no cdrom drive.
The issue is fixed if the lines
for i in /dev/scd*; do hal-disable-polling --device $(readlink -f $i); done > /dev/null 2>&1
and
for i in /dev/scd*; do hal-disable-polling --enable-polling --device $(readlink -f $i); done > /dev/null 2>&1
are replaced by
for i in /dev/scd*; do if [ -f $i ]; then hal-disable-polling --device $(readlink -f $i); fi; done > /dev/null 2>&1
and
for i in /dev/scd*; do if [ -f $i]; then hal-disable-polling --enable-polling --device $(readlink -f $i); fi; done > /dev/null 2>&1

   I'm sure it is not the most elegant fix but at least it works.

Comment 1 Jan Vcelak 2010-10-11 07:51:47 UTC
Thanks. I will fix it.

Comment 2 Jan Vcelak 2010-11-18 14:16:08 UTC
Fixed in upstream repo. The version will be bumped when there are some other changes as well.

Comment 3 Jan Vcelak 2010-11-29 12:01:23 UTC
Fixed in tuned-0.2.18-1.fc14.

Comment 4 Fedora Update System 2010-11-29 12:02:43 UTC
tuned-0.2.18-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/tuned-0.2.18-1.fc14

Comment 5 Fedora Update System 2010-11-29 21:30:01 UTC
tuned-0.2.18-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tuned'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/tuned-0.2.18-1.fc14

Comment 6 Fedora Update System 2010-12-07 20:10:23 UTC
tuned-0.2.18-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.