Subject: Re: Solaris /bin/sh severely broken (once again) (was: Re: Making pkgsrc
To: Roland Illig <rillig@NetBSD.org>
From: Rick Kelly <rmk@toad.rmkhome.com>
List: tech-pkg
Date: 02/07/2006 16:08:09
Roland Illig said:

>Thanks for noting this. By the way, you forgot to mention that this only 
>happens on Solaris. With a POSIX shell, this code works perfectly. :)
>
>I fixed it by replacing the code with this:
>
>if (cd "$dbdir" 1>/dev/null 2>&1); then
>     cd "$dbdir"
>
>This will make the subshell return an error code, and in case the 
>subshell could change the directory, the parent shell is very likely to 
>be able to do the same.

Or you could just have Sun use /usr/xpg4/bin/sh, which is a POSIX shell.
-- 
Rick Kelly	rmk@rmkhome.com
		<http://www.rmkhome.com/>
		<http://rkba.rmkhome.com/> - the right to keep and bear arms
		<http://wolf.rmkhome.com/> - firearm forums