Bug 11580 - Killing and restarting sound processes doesn't work if SHELL!=bash
Summary: Killing and restarting sound processes doesn't work if SHELL!=bash
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: apmd   
(Show other bugs)
Version: 1.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-22 16:30 UTC by Philip Zeyliger
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-22 16:53:23 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Philip Zeyliger 2000-05-22 16:30:30 UTC
/etc/sysconfig/apm-scripts/apmscript has the line:
su - "$SOUNDUSER" -c "source /etc/profile;[ -f ~/.bashrc ] && source
~/.bashrc;[ -f ~/.bash_profile ] && source ~/.bash_profile;export
DISPLAY="$SOUNDDISPLAY";$SOUNDPROG &"

If $SOUNDUSER is using "tcsh" (or other non-bash-like shells), sourc'ing
/etc/profile is not a good idea and it fails.  I modified the line to say
su - "$SOUNDUSER" --shell=/bin/bash -c ... and all works well.

On a seperate note, I'm using OpenSound's OSS/Linux ($35 drivers) and I had
to modify the script to use "soundoff" and "soundon" instead of the rmmod
and modprobe approach.  That's not really a bug, I guess.

Comment 1 Philip Zeyliger 2000-05-22 16:53:59 UTC
/etc/sysconfig/apm-scripts/apmscript has the line:
 su - "$SOUNDUSER" -c "source /etc/profile;[ -f ~/.bashrc ] && source
 ~/.bashrc;[ -f ~/.bash_profile ] && source ~/.bash_profile;export
 DISPLAY="$SOUNDDISPLAY";$SOUNDPROG &"

 If $SOUNDUSER is using "tcsh" (or other non-bash-like shells), sourc'ing
 /etc/profile is not a good idea and it fails.  I modified the line to say
 su - "$SOUNDUSER" --shell=/bin/bash -c ... and all works well.

Also: I changed the line that said:
ps -ax "$SOUNDPID" &>/dev/null
to:
ps "$SOUNDPID" &>/dev/null
Otherwise checking the exit status doesn't work and the script tries
to kill -9 even the programs that have already been killed.

 On a seperate note, I'm using OpenSound's OSS/Linux ($35 drivers) and I had
 to modify the script to use "soundoff" and "soundon" instead of the rmmod
 and modprobe approach.  That's not really a bug, I guess.

Comment 2 Bernhard Rosenkraenzer 2000-06-24 22:41:22 UTC
Thanks, fixed. I presume soundon and soundoff are in /usr/sbin?
I'm trying to invoke them from there now... (I don't have OSS)


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