[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Configuring AC97 sound



On Mon, Nov 10, 2003 at 09:35:22PM -0600, Kent West wrote:
> --- David Jardine <david@jardine.de> wrote:
> >
> >>On Mon, Nov 10, 2003 at 04:33:31PM -0600, Kent West wrote:
> >>
> >>
> >>>probably that you're not in the "audio" group. Add yourself to this
> >>>group with a command like "addgroup lynn audio" as root. Then log
> >>
> >>Shouldn't that be
> >>
> >>adduser lynn audio
> 
> 
> Either will work, as addgroup is a symlink to adduser:
> 
> enjae[westk]:/home/westk> ls -l /usr/sbin/addgroup
> lrwxrwxrwx    1 root     root            7 Aug 30 08:15 
> /usr/sbin/addgroup -> adduser
> 
> I just tend to think of adding users to groups as a group function. But 
> it is equally valid to think of it as a user function. Additionally, 
> since "adduser" is the real utility, it probably is more 
> accurate/portable to use your method.
> 

Yes, you're quite right.  But this brings up a question of 
principle.  It's a genuine question, because I'm quite 
inexperienced in all this.

- The manpage doesn't mention your way of doing it.
- The preamble to the actual adduser script doesn't mention it.
- The script starts by checking the command under which it was
called:

   $action = $0 eq "addgroup" ? "addgroup" : "adduser";

The "addgroup this_user this_group" slips through the subsequent 
checks, as it were, and functions as "adduser this_user this_
group".

This just seems "unclean" to me.  I'm aware that "there's always 
more than one way of doing something," and that in this case no 
harm can be done because of the definition of the command-line 
arguments, but this is one command substituting itself for 
another in an undocumented way.  Isn't there something sloppy 
about this that could cause trouble in other circumstances?  Or 
am I still a long way from understanding the unix/linux way of 
doing things?

David

-- 
David Jardine

"Running Debian GNU/Linux and
loving every minute of it." -Sacher M.



Reply to: