mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
support 'named -l' as a synonym for 'lwresd', so that the system
tests will work despite libtool losing argv[0]
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: main.c,v 1.83 2000/09/07 21:54:37 explorer Exp $ */
|
/* $Id: main.c,v 1.84 2000/09/16 01:41:34 gson Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -315,6 +315,9 @@ parse_command_line(int argc, char *argv[]) {
|
|||||||
|
|
||||||
save_command_line(argc, argv);
|
save_command_line(argc, argv);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See if we should run as lwresd.
|
||||||
|
*/
|
||||||
s = strrchr(argv[0], '/');
|
s = strrchr(argv[0], '/');
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
s = argv[0];
|
s = argv[0];
|
||||||
@@ -326,6 +329,19 @@ parse_command_line(int argc, char *argv[]) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* An alternative method of invoking lwresd. This is needed
|
||||||
|
* in libtoolized build trees, as the libtool-generated
|
||||||
|
* "named" script does not preserve argv[0].
|
||||||
|
*/
|
||||||
|
if (argc >= 2 && strcmp(argv[1], "-l") == 0) {
|
||||||
|
argc--;
|
||||||
|
argv++;
|
||||||
|
lwresd_only = ISC_TRUE;
|
||||||
|
parse_lwresd_command_line(argc, argv);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = ISC_FALSE;
|
||||||
while ((ch = isc_commandline_parse(argc, argv,
|
while ((ch = isc_commandline_parse(argc, argv,
|
||||||
"c:d:fgn:N:p:st:u:vx:")) !=
|
"c:d:fgn:N:p:st:u:vx:")) !=
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
# $Id: conf.sh.in,v 1.14 2000/09/13 01:36:44 marka Exp $
|
# $Id: conf.sh.in,v 1.15 2000/09/16 01:42:06 gson Exp $
|
||||||
|
|
||||||
#
|
#
|
||||||
# Common configuration data for system tests, to be sourced into
|
# Common configuration data for system tests, to be sourced into
|
||||||
@@ -29,7 +29,9 @@ TOP=${SYSTEMTESTTOP:=.}/../../..
|
|||||||
TOP=`cd $TOP && pwd`
|
TOP=`cd $TOP && pwd`
|
||||||
|
|
||||||
NAMED=$TOP/bin/named/named
|
NAMED=$TOP/bin/named/named
|
||||||
LWRESD=$TOP/bin/named/lwresd
|
# We must use "named -l" instead of "lwresd" because argv[0] is lost
|
||||||
|
# if the program is libtoolized.
|
||||||
|
LWRESD="$TOP/bin/named/named -l"
|
||||||
DIG=$TOP/bin/dig/dig
|
DIG=$TOP/bin/dig/dig
|
||||||
RNDC=$TOP/bin/rndc/rndc
|
RNDC=$TOP/bin/rndc/rndc
|
||||||
NSUPDATE=$TOP/bin/nsupdate/nsupdate
|
NSUPDATE=$TOP/bin/nsupdate/nsupdate
|
||||||
|
Reference in New Issue
Block a user