'test -S'

Tim Rice tim at multitalents.net
Thu Feb 8 09:26:03 EST 2001


On Wed, 7 Feb 2001, Tom Rudnick wrote:

> > > > What platforms do/don't support 'test -S' (without the addition of the
> > > > GNU tools)?
> 
> UnixWare v2.x does not support "test -S" in /bin/sh. 
> It is included in ksh, however.

Ahh, I think I have an idea. (... modify configure.in, test ...)

OK, here is a patch that should make the test -S stuff portable.
I also added "-o -p $egdsock" to the test for UnixWare.

It might not work for everything but it should work for a lot more systems.

> 
> I don't know about UnixWare 7.
> 
> 

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net

-------------- next part --------------
--- openssh_cvs/configure.in.old	Tue Feb  6 14:54:31 2001
+++ openssh_cvs/configure.in	Wed Feb  7 14:00:30 2001
@@ -14,6 +14,9 @@
 AC_PATH_PROG(ENT, ent)
 AC_SUBST(ENT)
 AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
+AC_PATH_PROG(TEST_MINUS_S_SH, bash)
+AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
+AC_PATH_PROG(TEST_MINUS_S_SH, sh)
 
 if test -z "$AR" ; then
 	AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
@@ -1079,8 +1082,8 @@
 		if test -z "$RANDOM_POOL" ; then
 			AC_MSG_CHECKING(for PRNGD/EGD socket)
 			# Insert other locations here
-			for egdsock in /var/run/egd-pool /etc/entropy ; do
-				if test -S $egdsock ; then
+			for egdsock in /var/run/egd-pool /etc/entropy /tmp/entropy ; do
+				if $TEST_MINUS_S_SH -c "test -S $egdsock -o -p $egdsock" ; then
 					EGD_SOCKET="$egdsock"
 					AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
 					AC_MSG_RESULT($egdsock)


More information about the openssh-unix-dev mailing list