Nmap Development mailing list archives

[PATCH] Re: is it a bug?


From: Daniel Roethlisberger <daniel () roe ch>
Date: Wed, 4 Mar 2009 18:44:15 +0100

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

wangyj, does this patch work for you?

The idea behind the test is that we'll create or update a
symlink to point to Zenmap, but we don't want to delete
somebody's copy of NmapFE if they still use it.

-- 
Daniel Roethlisberger
http://daniel.roe.ch/

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


Current thread: