Bug 11580 - Killing and restarting sound processes doesn't work if SHELL!=bash
Killing and restarting sound processes doesn't work if SHELL!=bash
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: apmd (Show other bugs)
1.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-22 12:30 EDT by Philip Zeyliger
Modified: 2008-05-01 11:37 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Philip Zeyliger 2000-05-22 12:30:30 EDT
/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 12:53:59 EDT
/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 18:41:22 EDT
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.