LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-20-2004, 04:38 PM   #1
rgiggs
Member
 
Registered: Apr 2004
Location: berkeley, ca
Distribution: slk10, winxp
Posts: 313

Rep: Reputation: 30
error in alsaconf script


hi,
when i run alsaconf as a normal user, i see this error:
Code:
/usr/sbin/alsaconf: line 35: [: too many arguments
/usr/sbin/alsaconf: line 37: [: too many arguments
You must be root to use this script.
when i run as root, alsaconf pops up the color screen so i can't see if it still gives the first 2 lines as errors.
i don't remember seeing the first 2 lines as errors before. i don't think it's important, so i removed those two elif's and the errors are gone. but i wonder why it suddenly has errors. this is my /usr/sbin/alsaconf (the red lines are lines 35 and 37 have errors as above):
Code:
# Check for GNU/Linux distributions
if [ -f /etc/SuSE-release -o -f /etc/UnitedLinux-release ]; then
  distribution="suse"
...
elif [ -f /etc/redhat-release -a `grep -c "Red Hat" /etc/redhat-release 2>/dev/null` -ne 0 ]; then
  distribution="redhat"
elif [ -f /etc/fedora-release -a `grep -c "Fedora" /etc/fedora-release 2>/dev/null` -ne 0 ]; then
  distribution="fedora"
else
  distribution="unknown"
fi

Last edited by rgiggs; 07-20-2004 at 04:42 PM.
 
Old 07-21-2004, 11:27 AM   #2
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
It may sound silly, but you said that you removed the two elif's; did you also remove the "distribution=" lines? If not, the script will improperly set your distribution. You could change this:

Code:
# Check for GNU/Linux distributions
if [ -f /etc/slackware-version ]; then
  distribution="slackware"
elif [ -f /etc/SuSE-release -o -f /etc/UnitedLinux-release ]; then
  distribution="suse"
elif [ -f /etc/gentoo-release ]; then
  distribution="gentoo"
elif [ -f /etc/debian_version ]; then
  distribution="debian"
elif [ -f /etc/mandrake-release ]; then
  distribution="mandrake"
elif [ -f /etc/redhat-release -a `grep -c "Red Hat" /etc/redhat-release 2>/dev/null` -ne 0 ]; then
  distribution="redhat"
elif [ -f /etc/fedora-release -a `grep -c "Fedora" /etc/fedora-release 2>/dev/null` -ne 0 ]; then
  distribution="fedora"
else
  distribution="unknown"
fi
To this:

Code:
# Check for GNU/Linux distributions
if [ -f /etc/slackware-version ]; then
  distribution="slackware"
else
  distribution="unknown"
fi
I don't know why you received the error, but there shouldn't be any problem changing the script. You'll also want to check and make sure that /etc/slackware-version still exists on your system. I'm just guessing here, but you might also want to check that /etc/redhat-release and /etc/fedora-release do'nt exist on your system. I don't know why they would, but if you are having trouble with those two lines, that would be something to look at.

Hope that helps,
 
Old 07-21-2004, 11:42 AM   #3
rgiggs
Member
 
Registered: Apr 2004
Location: berkeley, ca
Distribution: slk10, winxp
Posts: 313

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by shilo
It may sound silly, but you said that you removed the two elif's; did you also remove the "distribution=" lines?
of course.
yeah i'll change it to the slackware only conditional. thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Alsaconf Error: "No supported PnP or PCI cards found..." Baix Linux - Newbie 6 06-22-2009 05:08 AM
VIA82xx alsaconf error twinkers Linux - Hardware 2 09-17-2005 03:59 AM
alsaconf yusufozk Linux - Software 4 06-28-2005 08:38 AM
error while executing alsaconf mrosati Linux - Software 1 06-02-2004 07:05 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration