Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7420 - Inconsistent detection of sound device in init/halt scripts
Summary: Inconsistent detection of sound device in init/halt scripts
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-29 21:03 UTC by dim
Modified: 2014-03-17 02:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-11-29 21:45:21 UTC


Attachments (Terms of Use)

Description dim 1999-11-29 21:03:56 UTC
To check if mixer settings can be loaded/saved, /proc/devices is grepped
for a sound entry, but this is done inconsistently in different init
scripts.

In /etc/rc.d/rc.sysinit, where the settings are loaded, it says at line
290:
  grep -q "14 sound" /proc/devices 2>/dev/null

And in /etc/rc.d/init.d/halt, where the settings are saved, it says at line
54:
  grep -q "\(sparcaudio\|sound\)" /proc/devices

As the second method seems more portable (if sparcaudio is really used?
can't check since I have no sparc), I think it would be the best to also
use this for the first case.

Maybe it's better to move this "detection" to /etc/rc.d/init.d/functions,
ie something like:

checksound {
  return grep -q "\(sparcaudio\|sound\)" /proc/devices 2>/dev/null
}

which could then be used consistently in all init scripts.

Comment 1 Bill Nottingham 1999-11-29 21:45:59 UTC
fixed in initscripts-4.70-1. Thanks for noticing.


Note You need to log in before you can comment on or make changes to this bug.