Bug 61 - nsdc uses /bin/sh hardwired (and should not)
nsdc uses /bin/sh hardwired (and should not)
Status: CLOSED FIXED
Product: NSD
Classification: Unclassified
Component: NSD Code
1.2.0
All other
: P2 minor
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-17 13:37 CEST by Stephane Bortzmeyer
Modified: 2003-10-30 16:07 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Bortzmeyer 2003-07-17 13:37:23 CEST
nsdc uses shell constructs that are not recognized by every /bin/sh. 
For instance, on Tru64, I get a:

/local/sbin/nsdc: test: unknown operator -nt

The following patch uses autoconf's ability to find a proper shell:

diff -c -r nsd-1.2.1-orig/Makefile.in nsd-1.2.1-AFNIC/Makefile.in
*** nsd-1.2.1-orig/Makefile.in  Mon Jul  7 10:55:18 2003
--- nsd-1.2.1-AFNIC/Makefile.in Thu Jul 17 12:11:07 2003
***************
*** 75,80 ****
--- 75,81 ----
                        -e 's,@zonesfile\@,$(zonesfile),g' \
                        -e 's,@dbfile\@,$(dbfile),g' \
                        -e 's,@configfile\@,$(configfile),g' \
+                       -e 's,@shell\@,$(SHELL),g' \
                        -e 's,@namedxfer\@,$(namedxfer),g' \
                        -e 's,@user\@,$(user),g'
  
diff -c -r nsd-1.2.1-orig/nsdc.sh.in nsd-1.2.1-AFNIC/nsdc.sh.in
*** nsd-1.2.1-orig/nsdc.sh.in   Thu Jun 12 14:31:18 2003
--- nsd-1.2.1-AFNIC/nsdc.sh.in  Thu Jul 17 12:05:33 2003
***************
*** 1,4 ****
! #!/bin/sh
  #
  # $Id: nsdc.sh.in,v 1.26 2003/06/12 12:31:18 erik Exp $
  #
--- 1,4 ----
! #!@shell@
  #
  # $Id: nsdc.sh.in,v 1.26 2003/06/12 12:31:18 erik Exp $
  #
Comment 1 Erik Rozendaal 2003-07-21 11:35:20 CEST
Patch applied.  Another solution might be to use "find" to remove the use of -nt
altogether (find has the -newer option which is part of SUSv3).