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

Re: Configuring AC97 sound



David Jardine wrote:
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?


My opinion only: yes, it should be better documented.

One might argue that the top of the man page:

	adduser, addgroup - add a user or group to the system

implies that adduser and addgroup are the same program, and the two terms can be used interchangeably. But in my opinion, this should be stated more explicitly.

--
Kent




Reply to: