Commit 39387427 authored by Thomas Markwalder's avatar Thomas Markwalder

[2594] Moved d2Srv to d2, removed "Srv" and "srv" from file names

and source. Corrected other review items.
parent e448bbba
......@@ -1201,8 +1201,8 @@ AC_CONFIG_FILES([Makefile
src/bin/dhcp6/tests/Makefile
src/bin/dhcp4/Makefile
src/bin/dhcp4/tests/Makefile
src/bin/d2srv/Makefile
src/bin/d2srv/tests/Makefile
src/bin/d2/Makefile
src/bin/d2/tests/Makefile
src/bin/resolver/Makefile
src/bin/resolver/tests/Makefile
src/bin/resolver/bench/Makefile
......@@ -1381,7 +1381,7 @@ AC_OUTPUT([doc/version.ent
src/bin/auth/gen-statisticsitems.py.pre
src/bin/dhcp4/spec_config.h.pre
src/bin/dhcp6/spec_config.h.pre
src/bin/d2srv/spec_config.h.pre
src/bin/d2/spec_config.h.pre
src/bin/tests/process_rename_test.py
src/lib/config/tests/data_def_unittests_config.h
src/lib/python/isc/config/tests/config_test
......
SUBDIRS = bind10 bindctl cfgmgr ddns loadzone msgq cmdctl auth xfrin \
xfrout usermgr zonemgr stats tests resolver sockcreator dhcp4 dhcp6 d2srv\
xfrout usermgr zonemgr stats tests resolver sockcreator dhcp4 dhcp6 d2\
dbutil sysinfo
check-recursive: all-recursive
......@@ -18,15 +18,15 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES = *.gcno *.gcda spec_config.h d2_srv_messages.h d2_srv_messages.cc
man_MANS = b10-d2srv.8
man_MANS = b10-d2.8
DISTCLEANFILES = $(man_MANS)
EXTRA_DIST = $(man_MANS) b10-d2srv.xml d2srv.spec
EXTRA_DIST = $(man_MANS) b10-d2.xml d2.spec
if GENERATE_DOCS
b10-d2srv.8: b10-d2srv.xml
b10-d2.8: b10-d2.xml
@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
$(srcdir)/b10-d2srv.xml
$(srcdir)/b10-d2.xml
else
......@@ -39,27 +39,20 @@ endif
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
d2srv_messages.h d2srv_messages.cc: d2srv_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/d2srv/d2srv_messages.mes
d2_messages.h d2_messages.cc: d2_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/d2/d2_messages.mes
BUILT_SOURCES = spec_config.h d2srv_messages.h d2srv_messages.cc
BUILT_SOURCES = spec_config.h d2_messages.h d2_messages.cc
pkglibexec_PROGRAMS = b10-d2srv
pkglibexec_PROGRAMS = b10-d2
b10_d2srv_SOURCES = main.cc
b10_d2srv_SOURCES += d2srv_log.cc d2srv_log.h
b10_d2_SOURCES = main.cc
b10_d2_SOURCES += d2_log.cc d2_log.h
nodist_b10_d2srv_SOURCES = d2srv_messages.h d2srv_messages.cc
EXTRA_DIST += d2srv_messages.mes
nodist_b10_d2_SOURCES = d2_messages.h d2_messages.cc
EXTRA_DIST += d2_messages.mes
b10_d2srv_LDADD = $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/dhcpsrv/libb10-dhcpsrv.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la
b10_d2srv_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la
b10_d2_LDADD = $(top_builddir)/src/lib/log/libb10-log.la
b10_d2srvdir = $(pkgdatadir)
b10_d2srv_DATA = d2srv.spec
b10_d2dir = $(pkgdatadir)
b10_d2_DATA = d2.spec
......@@ -2,7 +2,7 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
......@@ -20,30 +20,30 @@
<refentry>
<refentryinfo>
<date>October 27, 2011</date>
<date>May 15, 2013</date>
</refentryinfo>
<refmeta>
<refentrytitle>b10-d2srv</refentrytitle>
<refentrytitle>b10-d2</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo>BIND10</refmiscinfo>
</refmeta>
<refnamediv>
<refname>b10-d2srv</refname>
<refpurpose>DHCPv4 server in BIND 10 architecture</refpurpose>
<refname>b10-d2</refname>
<refpurpose>D2 process in BIND 10 architecture</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2011</year>
<year>2013</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>b10-d2srv</command>
<command>b10-d2</command>
<arg><option>-v</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
......@@ -51,8 +51,8 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
The <command>b10-d2srv</command> daemon will provide the
D2 server implementation when it becomes functional.
The <command>b10-d2</command> daemon processes requests to
to update DNS mapping based on DHCP lease change events.
</para>
</refsect1>
......@@ -79,7 +79,7 @@
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>b10-init</refentrytitle><manvolnum>8</manvolnum>
<refentrytitle>b10-d2</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum>
......@@ -90,8 +90,8 @@
<refsect1>
<title>HISTORY</title>
<para>
The <command>b10-d2srv</command> daemon was first coded in
November 2013 by Thomas Markwalder
The <command>b10-d2</command> process was first coded in
May 2013 by the ISC Kea/Dhcp team.
</para>
</refsect1>
</refentry><!--
......
{
"module_spec": {
"module_name": "D2Srv",
"module_description": "DHCP-DDNS server daemon",
"module_name": "D2",
"module_description": "DHCP-DDNS process",
"config_data": [
],
"commands": [
{
"command_name": "shutdown",
"command_description": "Shuts down D2Srv server.",
"command_description": "Shuts down the D2 process.",
"command_args": [
{
"item_name": "pid",
......
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -14,13 +14,13 @@
/// Defines the logger used by the top-level component of b10-dhcp4.
#include <d2srv/d2srv_log.h>
#include <d2/d2_log.h>
namespace isc {
namespace d2srv {
namespace d2 {
isc::log::Logger d2srv_logger("d2srv");
isc::log::Logger d2_logger("d2");
} // namespace d2srv
} // namespace d2
} // namespace isc
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -12,23 +12,23 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef D2SRV_LOG_H
#define D2SRV_LOG_H
#ifndef D2_LOG_H
#define D2_LOG_H
#include <log/logger_support.h>
#include <log/macros.h>
#include <d2srv/d2srv_messages.h>
#include <d2/d2_messages.h>
namespace isc {
namespace d2srv {
namespace d2 {
/// Define the logger for the "dhcp4" module part of b10-dhcp4. We could define
/// a logger in each file, but we would want to define a common name to avoid
/// spelling mistakes, so it is just one small step from there to define a
/// module-common logger.
extern isc::log::Logger d2srv_logger;
extern isc::log::Logger d2_logger;
} // namespace d2srv
} // namespace d2
} // namespace isc
#endif // D2SRV_LOG_H
#endif // D2_LOG_H
# Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -12,17 +12,17 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
$NAMESPACE isc::d2srv
$NAMESPACE isc::d2
% D2SRV_STARTING : server starting
This is a debug message issued during a DController server startup.
% D2_STARTING : process starting
This is a debug message issued during a D2 process startup.
% D2SRV_START_INFO pid: %1, verbose: %2, standalone: %3
This is a debug message issued during the DController server startup.
It lists some information about the parameters with which the server
is running.
% D2_START_INFO pid: %1, verbose: %2, standalone: %3
This is a debug message issued during the D2 process startup.
It lists some information about the parameters with which the
process is running.
% D2SRV_SHUTDOWN : server is performing a normal shutting down
This is a debug message issued when a D2Server shuts down
% D2_SHUTDOWN : process is performing a normal shutting down
This is a debug message issued when a D2 process shuts down
normally in response to command to stop.
// Copyright (C) 2011-2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -13,31 +13,31 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <d2srv/d2srv_log.h>
#include <d2/d2_log.h>
#include <log/logger_support.h>
#include <log/logger_manager.h>
#include <iostream>
using namespace isc::d2srv;
using namespace isc::d2;
using namespace std;
/// This file contains entry point (main() function) for standard DHCP-DDNS
/// server, b10-d2srv, component for BIND10 framework. It parses command-line
/// process, b10-d2, component for BIND10 framework. It parses command-line
/// arguments and instantiates D2Controller class that is responsible for
/// establishing connection with msgq (receiving commands and configuration)
/// and also creating D2Server object as well.
///
/// For detailed explanation or relations between main(), D2Controller,
/// D2Server and other classes, see \ref d2srvSession.
/// D2Server and other classes, see \ref d2Session.
namespace {
const char* const D2SRV_NAME = "b10-d2srv";
const char* const D2_NAME = "b10-d2";
void
usage() {
cerr << "Usage: " << D2SRV_NAME << " [-v] [-s] [-p number]" << endl;
cerr << "Usage: " << D2_NAME << " [-v] [-s]" << endl;
cerr << " -v: verbose output" << endl;
cerr << " -s: stand-alone mode (don't connect to BIND10)" << endl;
exit(EXIT_FAILURE);
......@@ -47,6 +47,12 @@ usage() {
int
main(int argc, char* argv[]) {
int ch;
// NOTE these parameters are preliminary only. They are here to
// for symmetry with the DHCP servers. They may or may not
// become part of the eventual implementation.
bool stand_alone = false; // Should be connect to BIND10 msgq?
bool verbose_mode = false; // Should server be verbose?
......@@ -72,18 +78,20 @@ main(int argc, char* argv[]) {
// Initialize logging. If verbose, we'll use maximum verbosity.
// If standalone is enabled, do not buffer initial log messages
isc::log::initLogger(D2SRV_NAME,
isc::log::initLogger(D2_NAME,
(verbose_mode ? isc::log::DEBUG : isc::log::INFO),
isc::log::MAX_DEBUG_LEVEL, NULL, !stand_alone);
LOG_INFO(d2srv_logger, D2SRV_STARTING);
LOG_DEBUG(d2srv_logger, DBGLVL_START_SHUT, D2SRV_START_INFO)
LOG_INFO(d2_logger, D2_STARTING);
LOG_DEBUG(d2_logger, DBGLVL_START_SHUT, D2_START_INFO)
.arg(getpid()).arg(verbose_mode ? "yes" : "no")
.arg(stand_alone ? "yes" : "no" );
int ret = EXIT_SUCCESS;
// For now we will sleep awhile to simulate doing something.
// Without at least a sleep, the process will start, exit and be
// restarted by Bind10/Init endlessley in a rapid succession.
sleep(1000);
LOG_INFO(d2srv_logger, D2SRV_SHUTDOWN);
return (ret);
LOG_INFO(d2_logger, D2_SHUTDOWN);
return (EXIT_SUCCESS);
}
// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -12,4 +12,4 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#define DHCP4_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/dhcp4.spec"
#define D2_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/d2.spec"
PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
PYTESTS = d2srv_test.py
PYTESTS = d2_test.py
EXTRA_DIST = $(PYTESTS)
# Explicitly specify paths to dynamic libraries required by loadable python
......@@ -28,7 +28,7 @@ AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/asiolink
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/d2srv/tests\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/bin/d2/tests\"
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile
......@@ -49,23 +49,23 @@ TESTS_ENVIRONMENT = \
TESTS =
if HAVE_GTEST
TESTS += d2srv_unittests
TESTS += d2_unittests
d2srv_unittests_SOURCES = ../d2srv_log.h ../d2srv_log.cc
d2srv_unittests_SOURCES += d2srv_unittests.cc
nodist_d2srv_unittests_SOURCES = ../d2srv_messages.h ../d2srv_messages.cc
d2_unittests_SOURCES = ../d2_log.h ../d2_log.cc
d2_unittests_SOURCES += d2_unittests.cc
nodist_d2_unittests_SOURCES = ../d2_messages.h ../d2_messages.cc
d2srv_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
d2srv_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
d2srv_unittests_LDADD = $(GTEST_LDADD)
d2srv_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libb10-dhcpsrv.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
d2srv_unittests_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
d2_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
d2_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
d2_unittests_LDADD = $(GTEST_LDADD)
d2_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
d2_unittests_LDADD += $(top_builddir)/src/lib/cc/libb10-cc.la
d2_unittests_LDADD += $(top_builddir)/src/lib/config/libb10-cfgclient.la
d2_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
d2_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libb10-dhcpsrv.la
d2_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
d2_unittests_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
d2_unittests_LDADD += $(top_builddir)/src/lib/util/libb10-util.la
endif
noinst_PROGRAMS = $(TESTS)
# Copyright (C) 2012 Internet Systems Consortium.
# Copyright (C) 2013 Internet Systems Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -25,7 +25,7 @@ import time
import isc
import fcntl
class TestD2srvDaemon(unittest.TestCase):
class TestD2Daemon(unittest.TestCase):
def setUp(self):
# Don't redirect stdout/stderr here as we want to print out things
# during the test
......@@ -156,13 +156,12 @@ class TestD2srvDaemon(unittest.TestCase):
return (rc, output, error)
def test_alive(self):
print("Note: Purpose of some of the tests is to check if D2 server can be started,")
print(" not that is can bind sockets correctly. Please ignore binding errors.")
print("THIS TEST IS A PLACE HOLDER DURING INITIAL D2 SERVER WORK - IT ALWAYS PASSES")
#(returncode, output, error) = self.runCommand(["../b10-d2srv", "-v"])
#output_text = str(output) + str(error)
#self.assertEqual(output_text.count("D2SRV_STARTING"), 1)
print("Note: Simple test to verify that D2 server can be started.")
# note that "-s" for stand alone is necessary in order to flush the log output
# soon enough to catch it.
(returncode, output, error) = self.runCommand(["../b10-d2", "-s"])
output_text = str(output) + str(error)
self.assertEqual(output_text.count("D2_STARTING"), 1)
if __name__ == '__main__':
unittest.main()
// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -13,7 +13,7 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <log/logger_support.h>
#include <d2srv/d2srv_log.h>
#include <d2/d2_log.h>
#include <gtest/gtest.h>
int
......
#! /bin/sh
# d2srv_unittests - temporary wrapper script for .libs/d2srv_unittests
# Generated by libtool (GNU libtool) 2.4.2
#
# The d2srv_unittests program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=""
# This environment variable determines our operation mode.
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
# install mode needs the following variables:
generated_by_libtool_version='2.4.2'
notinst_deplibs=' ../../../../src/lib/asiolink/libb10-asiolink.la ../../../../src/lib/cc/libb10-cc.la ../../../../src/lib/config/libb10-cfgclient.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/cc/libb10-cc.la ../../../../src/lib/dhcp/libb10-dhcp++.la ../../../../src/lib/dhcpsrv/libb10-dhcpsrv.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/dhcp/libb10-dhcp++.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/asiolink/libb10-asiolink.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/log/libb10-log.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/dns/libb10-dns++.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/cryptolink/libb10-cryptolink.la ../../../../src/lib/exceptions/libb10-exceptions.la ../../../../src/lib/log/libb10-log.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/util/libb10-util.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/util/threads/libb10-threads.la ../../../../src/lib/util/libb10-util.la /Users/tmark/ddns/build/trac2954/bind10/src/lib/exceptions/libb10-exceptions.la'
else
# When we are sourced in execute mode, $file and $ECHO are already set.
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
file="$0"
# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
eval 'cat <<_LTECHO_EOF
$1
_LTECHO_EOF'
}
ECHO="printf %s\\n"
fi
# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
# /script/ and the wrapper /executable/ which is used only on
# windows platforms, and (c) all begin with the string --lt-
# (application programs are unlikely to have options which match
# this pattern).
#
# There are only two supported options: --lt-debug and
# --lt-dump-script. There is, deliberately, no --lt-help.
#
# The first argument to this parsing function should be the
# script's ../../../../libtool value, followed by no.
lt_option_debug=
func_parse_lt_options ()
{
lt_script_arg0=$0
shift
for lt_opt
do
case "$lt_opt" in
--lt-debug) lt_option_debug=1 ;;
--lt-dump-script)
lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'`
test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=.
lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'`
cat "$lt_dump_D/$lt_dump_F"
exit 0
;;
--lt-*)
$ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2
exit 1
;;
esac
done
# Print the debug banner immediately:
if test -n "$lt_option_debug"; then
echo "d2srv_unittests:d2srv_unittests:${LINENO}: libtool wrapper (GNU libtool) 2.4.2" 1>&2
fi
}
# Used when --lt-debug. Prints its arguments to stdout
# (redirection is the responsibility of the caller)
func_lt_dump_args ()
{
lt_dump_args_N=1;
for lt_arg
do
$ECHO "d2srv_unittests:d2srv_unittests:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg"
lt_dump_args_N=`expr $lt_dump_args_N + 1`
done
}
# Core function for launching the target application
func_exec_program_core ()
{
if test -n "$lt_option_debug"; then
$ECHO "d2srv_unittests:d2srv_unittests:${LINENO}: newargv[0]: $progdir/$program" 1>&2
func_lt_dump_args ${1+"$@"} 1>&2
fi
exec "$progdir/$program" ${1+"$@"}
$ECHO "$0: cannot exec $program $*" 1>&2
exit 1
}
# A function to encapsulate launching the target application
# Strips options in the --lt-* namespace from $@ and
# launches target application with the remaining arguments.
func_exec_program ()
{
case " $* " in
*\ --lt-*)
for lt_wr_arg
do
case $lt_wr_arg in
--lt-*) ;;
*) set x "$@" "$lt_wr_arg"; shift;;
esac
shift
done ;;
esac
func_exec_program_core ${1+"$@"}
}
# Parse options
func_parse_lt_options "$0" ${1+"$@"}
# Find the directory that this script lives in.
thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'`
test "x$thisdir" = "x$file" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'`
while test -n "$file"; do
destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'`
# If there was a directory component, then change thisdir.
if test "x$destdir" != "x$file"; then
case "$destdir" in
[\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
*) thisdir="$thisdir/$destdir" ;;
esac
fi
file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'`
file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'`
done
# Usually 'no', except on cygwin/mingw when embedded into
# the cwrapper.
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
# special case for '.'
if test "$thisdir" = "."; then
thisdir=`pwd`
fi
# remove .libs from thisdir
case "$thisdir" in
*[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;;
.libs ) thisdir=. ;;
esac
fi
# Try to get the absolute directory name.
absdir=`cd "$thisdir" && pwd`
test -n "$absdir" && thisdir="$absdir"
program='d2srv_unittests'
progdir="$thisdir/.libs"
if test -f "$progdir/$program"; then
# Add our own library path to DYLD_LIBRARY_PATH
DYLD_LIBRARY_PATH="/Users/tmark/ddns/build/trac2954/bind10/src/lib/asiolink/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/cc/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/config/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/dhcp/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/dhcpsrv/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/log/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/dns/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/cryptolink/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/exceptions/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/util/.libs:/Users/tmark/ddns/build/trac2954/bind10/src/lib/util/threads/.libs:$DYLD_LIBRARY_PATH"
# Some systems cannot cope with colon-terminated DYLD_LIBRARY_PATH
# The second colon is a workaround for a bug in BeOS R4 sed
DYLD_LIBRARY_PATH=`$ECHO "$DYLD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'`
export DYLD_LIBRARY_PATH
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
# Run the actual program with our arguments.
func_exec_program ${1+"$@"}
fi
else
# The program doesn't exist.
$ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
$ECHO "This script is just a wrapper for $program." 1>&2
$ECHO "See the libtool documentation for more information." 1>&2
exit 1
fi
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment