Copy from home:tiwai:branches:multimedia:libs/alsa via accept of submit request 18701
Request was accepted with message: OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=37
This commit is contained in:
parent
c0292519f7
commit
bfcd356e88
33
alsa-info.sh
33
alsa-info.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCRIPT_VERSION=0.4.57
|
SCRIPT_VERSION=0.4.58
|
||||||
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
|
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@ -46,7 +46,7 @@ pbcheck(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
SHFILE=`mktemp -p /tmp alsa-info.XXXXXXXXXX`
|
SHFILE=`mktemp -t alsa-info.XXXXXXXXXX` || exit 1
|
||||||
wget -O $SHFILE "http://www.alsa-project.org/alsa-info.sh" >/dev/null 2>&1
|
wget -O $SHFILE "http://www.alsa-project.org/alsa-info.sh" >/dev/null 2>&1
|
||||||
REMOTE_VERSION=`grep SCRIPT_VERSION $SHFILE |head -n1 |sed 's/.*=//'`
|
REMOTE_VERSION=`grep SCRIPT_VERSION $SHFILE |head -n1 |sed 's/.*=//'`
|
||||||
if [ "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then
|
if [ "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then
|
||||||
@ -74,8 +74,7 @@ update() {
|
|||||||
echo "Please re-run the script"
|
echo "Please re-run the script"
|
||||||
rm $SHFILE 2>/dev/null
|
rm $SHFILE 2>/dev/null
|
||||||
else
|
else
|
||||||
mv -f $SHFILE /tmp/alsa-info.sh || exit 1
|
echo "ALSA-Info script has been downloaded as $SHFILE."
|
||||||
echo "ALSA-Info script has been downloaded as /tmp/alsa-info.sh."
|
|
||||||
echo "Please re-run the script from new location."
|
echo "Please re-run the script from new location."
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
@ -92,8 +91,7 @@ update() {
|
|||||||
echo "ALSA-Info script has been updated. Please re-run it."
|
echo "ALSA-Info script has been updated. Please re-run it."
|
||||||
rm $SHFILE 2>/dev/null
|
rm $SHFILE 2>/dev/null
|
||||||
else
|
else
|
||||||
mv -f $SHFILE /tmp/alsa-info.sh || exit 1
|
echo "ALSA-Info script has been downloaded $SHFILE."
|
||||||
echo "ALSA-Info script has been downloaded as /tmp/alsa-info.sh."
|
|
||||||
echo "Please, re-run it from new location."
|
echo "Please, re-run it from new location."
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
@ -105,8 +103,9 @@ update() {
|
|||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
if [ -n "$TEMPDIR" -a "$KEEP_FILES" != "yes" ]; then
|
if [ -n "$TEMPDIR" -a "$KEEP_FILES" != "yes" ]; then
|
||||||
rm -r "$TEMPDIR" 2>/dev/null
|
rm -rf "$TEMPDIR" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
test -n "$KEEP_OUTPUT" || rm -f "$NFILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -309,6 +308,9 @@ SYSFS=$(mount |grep sysfs|awk {'print $3'});
|
|||||||
#Check modprobe config files for sound related options
|
#Check modprobe config files for sound related options
|
||||||
SNDOPTIONS=$(modprobe -c|sed -n 's/^options \(snd[-_][^ ]*\)/\1:/p')
|
SNDOPTIONS=$(modprobe -c|sed -n 's/^options \(snd[-_][^ ]*\)/\1:/p')
|
||||||
|
|
||||||
|
KEEP_OUTPUT=
|
||||||
|
NFILE=""
|
||||||
|
|
||||||
PASTEBIN=""
|
PASTEBIN=""
|
||||||
WWWSERVICE="www.alsa-project.org"
|
WWWSERVICE="www.alsa-project.org"
|
||||||
WELCOME="yes"
|
WELCOME="yes"
|
||||||
@ -380,9 +382,11 @@ fi # dialog
|
|||||||
fi # WELCOME
|
fi # WELCOME
|
||||||
|
|
||||||
#Set the output file
|
#Set the output file
|
||||||
TEMPDIR=`mktemp -p /tmp -d alsa-info.XXXXXXXXXX`
|
TEMPDIR=`mktemp -t -d alsa-info.XXXXXXXXXX` || exit 1
|
||||||
FILE="$TEMPDIR/alsa-info.txt"
|
FILE="$TEMPDIR/alsa-info.txt"
|
||||||
NFILE="/tmp/alsa-info.txt"
|
if [ -z "$NFILE" ]; then
|
||||||
|
NFILE=`mktemp -t alsa-info.txt.XXXXXXXXXX` || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
trap cleanup 0
|
trap cleanup 0
|
||||||
|
|
||||||
@ -394,9 +398,6 @@ then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Create the temporary work dir.
|
|
||||||
mkdir $TEMPDIR 2>/dev/null
|
|
||||||
|
|
||||||
#Fetch the info and store in temp files/variables
|
#Fetch the info and store in temp files/variables
|
||||||
DISTRO=`grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus" /etc/{issue,*release,*version}`
|
DISTRO=`grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus" /etc/{issue,*release,*version}`
|
||||||
KERNEL_VERSION=`uname -r`
|
KERNEL_VERSION=`uname -r`
|
||||||
@ -629,6 +630,11 @@ then
|
|||||||
UPLOAD="no"
|
UPLOAD="no"
|
||||||
withall
|
withall
|
||||||
;;
|
;;
|
||||||
|
--output)
|
||||||
|
shift
|
||||||
|
NFILE="$1"
|
||||||
|
KEEP_OUTPUT="yes"
|
||||||
|
;;
|
||||||
--debug)
|
--debug)
|
||||||
echo "Debugging enabled. $FILE and $TEMPDIR will not be deleted"
|
echo "Debugging enabled. $FILE and $TEMPDIR will not be deleted"
|
||||||
KEEP_FILES="yes"
|
KEEP_FILES="yes"
|
||||||
@ -710,6 +716,7 @@ then
|
|||||||
echo " --with-devices (shows the device nodes in /dev/snd/)"
|
echo " --with-devices (shows the device nodes in /dev/snd/)"
|
||||||
echo " --with-dmesg (shows the ALSA/HDA kernel messages)"
|
echo " --with-dmesg (shows the ALSA/HDA kernel messages)"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo " --output FILE (specify the file to output for no-upload mode)"
|
||||||
echo " --update (check server for script updates)"
|
echo " --update (check server for script updates)"
|
||||||
echo " --upload (upload contents to remote server)"
|
echo " --upload (upload contents to remote server)"
|
||||||
echo " --no-upload (do not upload contents to remote server)"
|
echo " --no-upload (do not upload contents to remote server)"
|
||||||
@ -756,6 +763,7 @@ if [ "$UPLOAD" = "no" ]; then
|
|||||||
|
|
||||||
if [ -z "$TOSTDOUT" ]; then
|
if [ -z "$TOSTDOUT" ]; then
|
||||||
mv -f $FILE $NFILE || exit 1
|
mv -f $FILE $NFILE || exit 1
|
||||||
|
KEEP_OUTPUT="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $DIALOG ]]
|
if [[ -n $DIALOG ]]
|
||||||
@ -869,6 +877,7 @@ echo ""
|
|||||||
#We couldnt find a suitable wget, so tell the user to upload manually.
|
#We couldnt find a suitable wget, so tell the user to upload manually.
|
||||||
else
|
else
|
||||||
mv -f $FILE $NFILE || exit 1
|
mv -f $FILE $NFILE || exit 1
|
||||||
|
KEEP_OUTPUT="yes"
|
||||||
if [[ -z $DIALOG ]]
|
if [[ -z $DIALOG ]]
|
||||||
then
|
then
|
||||||
if [[ -z $PASTEBIN ]]; then
|
if [[ -z $PASTEBIN ]]; then
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 26 10:30:12 CEST 2009 - tiwai@suse.de
|
||||||
|
|
||||||
|
- fix alsa-info.sh possible symlink attach (bnc#533396,
|
||||||
|
CVE-2009-0035)
|
||||||
|
- add -q to killall in alsasound init script to be more quiet
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 21 01:26:21 CEST 2009 - tiwai@suse.de
|
Fri Aug 21 01:26:21 CEST 2009 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ case "$1" in
|
|||||||
if [ -d /proc/asound ]; then
|
if [ -d /proc/asound ]; then
|
||||||
$alsactl -f $asoundcfg store
|
$alsactl -f $asoundcfg store
|
||||||
# kill pulseaudio before muting the system (bnc#499445)
|
# kill pulseaudio before muting the system (bnc#499445)
|
||||||
if killall -TERM pulseaudio; then
|
if killall -q -TERM pulseaudio; then
|
||||||
usleep 200
|
usleep 200
|
||||||
fi
|
fi
|
||||||
mute_system
|
mute_system
|
||||||
|
Loading…
x
Reference in New Issue
Block a user