On Wed, Oct 7, 2009 at 8:20 AM, Garrett D'Amore <[email protected]> wrote:
> Looking at this stuff, I noticed a few things:
>
> 1) we have GNU coreutils (for better or worse) delivering "whoami" into
> /usr/bin now. Couldn't /usr/ucb/whoami become a link to that via ../bin/ ?
> I guess this would then depend on SUNWgnu-coreutils
How hard is whoami to implement, really? Given that, I'm not keen
on creating a dependency. Heck, why not:
#!/bin/sh
exec /usr/xpg4/bin/id -un
(and why not fix /usr/bin/id to match xpg4?)
> 2) /usr/ucb/basename is semantically identical to /usr/xpg4/bin/basename.
> So it could be a link to ../xpg4/bin/basename, although that would make it
> depend on SUNWxcu4. Right now it doesn't do that. Thoughts?
Why not ditch /usr/bin/basename and make that be identical to the xpg4
version as well (and then link /usr/ucb/basename to /usr/bin/basename).
Is there anything using the non-standard /usr/bin/basename behaviour?
> 3) chown differs primarily in that it uses "." instead of ":" to delineate
> the group name from the username. It seems like the "standard" (Solaris
> version in /usr/bin) could honor *both* : and . fairly easily. (I think
> the xpg4 has to remain the way it is to avoid breaking compatibility.) Is
> it even possible that a user or group name be constructed that contains "."?
> What are the semantics of this?
Well, "." is a valid character in a username. I'm sure I've seen users
have dots in names, and passwd(4) says it's allowed.
Personally, I would ditch /usr/ucb/chown and the owner.group behaviour.
I see no good coming from adding the user.group syntax to /usr/bin/chown
The only small issue I have with that is that /usr/ucb/chown has -h on by
default, which may surprise users who assume /usr/bin/chown behaves
the same way. (I've always wondered why chown -h wasn't the default.)
> 4) ln -- I don't see how this differs from the stock ln, at least by reading
> the manual pages. Can't this just be made a link to either /usr/bin/ln or
> /usr/xpg4/bin/ln (whichever semantics are more appropriate?)
Again, why is xpg4 different? The only difference is that /usr/bin/ln
is documented as ignoring -n, but the xpg4 one does so as well.
> I'm just thinking cleaning up /usr/ucb stuff might be helpful here.
As noted above, it's not just /usr/ucb that needs clearing up. The fact
that we have xpg{4,6} and ucb (and now gnu) in addition to /usr/bin
is a problem; I use /usr/ucb in preference to /usr/bin which shows
how bad some of the /usr/bin commands are. I would love for
Solaris to get to a state where I didn't need to do that. (Casper's
merged ps and the recent ls enhancements are getting us closer.)
--
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code