Nmap Development mailing list archives

Re: [PATCH] Re: is it a bug?


From: David Fifield <david () bamsoftware com>
Date: Wed, 4 Mar 2009 11:35:21 -0700

On Wed, Mar 04, 2009 at 06:44:15PM +0100, Daniel Roethlisberger wrote:
David Fifield <david () bamsoftware com> 2009-03-04:
On Wed, Mar 04, 2009 at 03:40:01PM +0100, Daniel Roethlisberger wrote:
David Fifield <david () bamsoftware com> 2009-03-04:
On Wed, Mar 04, 2009 at 03:02:54PM +0800, wangyj wrote:
i do this
sh configure (it's ok)
make    (it's ok too)
make install

running install_data
if [ ! -e /usr/local/bin/nmapfe -o -L /usr/local/bin/nmapfe ]; then \
        ln -sf zenmap /usr/local/bin/nmapfe; \
fi
/bin/sh: test: unknow operation /usr/local/bin/nmapfe
make: *** [install-zenmap] Error 1

What operating system is this on? I guess the [ line isn't portable. If
you tell us the OS we can look up the man page and rewrite the test.

Solaris /bin/sh does not have test -e (as opposed to
/usr/xpg4/bin/sh, which does).  In this context, I think -f
instead of -e should preserve the behaviour and be more portable.

So you have access to Solaris? If you can give this a quick
test then go ahead and check in a fix.

Yes, but there's no ``quick test'' when it comes to Solaris,
especially with production boxes not set up for development :-)

Changing -e to -f sounds good, but if it doesn't have -e it
might not have -L either.

It does have -L, both in theory (man 1 test) and practice (I've
tested the [ ! -f file -o -L file ] syntax in /bin/sh and it does
the right thing).

Since I am not authorized to commit to /nmap, here's a patch:
http://daniel.roe.ch/code/nmap/nmap-Makefile.in-Solaris.diff

Thanks, looking at the man page and trying the syntax should be testing
enough. I applied your patch.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: