diff --git a/Makefile.am b/Makefile.am index 9e6b7acf3..b907bb6c0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,9 +36,7 @@ AM_CPPFLAGS = \ install-data-hook: $(MKDIR_P) $(DESTDIR)/$(localstatedir)/log/nextepc -# chown $(current_user):$(current_group) $(DESTDIR)/$(localstatedir)/log/nextepc $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc -# chown $(current_user):$(current_group) $(DESTDIR)/$(localstatedir)/run/nextepc CLEANFILES = symtbl.c DISTCLEANFILES = $(DIST_ARCHIVES) diff --git a/configure.ac b/configure.ac index b14c44baa..1550e4f28 100644 --- a/configure.ac +++ b/configure.ac @@ -16,9 +16,6 @@ dnl Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign]) -# Minimum Autoconf version required. -AC_PREREQ(2.63) - # Where to generate output; srcdir location. AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS. AC_CONFIG_SRCDIR([main.c]) @@ -63,19 +60,23 @@ AH_VERBATIM([_REENTRANT], #endif ]) -dnl Checks CC and freinds -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_AWK -AC_PROG_SED -#AC_PROG_YACC -#AC_PROG_LEX -AM_PROG_AR +dnl kernel style compile messages +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -dnl libtool +dnl Checks CC and freinds +AC_PROG_MAKE_SET +AC_PROG_MKDIR_P +AC_PROG_CC +AC_PROG_INSTALL +AM_PROG_AR LT_INIT +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test "x$PKG_CONFIG" = "xno"; then + AC_MSG_ERROR([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + dnl Checks for compile flag AX_CHECK_COMPILE_FLAG([-Wno-unused-result], [CFLAGS="$CFLAGS -Wno-unused-result"]) @@ -193,81 +194,15 @@ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], #### Checks for Directories. ##### ################################## +adl_RECURSIVE_EVAL(["${bindir}"], [BIN_DIR]) adl_RECURSIVE_EVAL(["${libdir}"], [LIB_DIR]) adl_RECURSIVE_EVAL(["${sysconfdir}"], [SYSCONF_DIR]) adl_RECURSIVE_EVAL(["${localstatedir}"], [LOCALSTATE_DIR]) +AC_SUBST(BIN_DIR) AC_SUBST(LIB_DIR) AC_SUBST(SYSCONF_DIR) AC_SUBST(LOCALSTATE_DIR) -AC_SUBST(systemd_unit_dir) -AC_ARG_WITH( - systemd-unit-dir, - AS_HELP_STRING( - [--with-systemdsystemunitdir=DIR], - [systemd unit directory @<:@SYSTEMD_UNIT_DIR@:>@ - Defaults to the correct value for debian /etc/systemd/system/] - ), - [ - systemd_unit_dir="$withval" - ], - [ - # default to the systemd admin unit directory - which pkg-config - pkg_config_exists=$? - if test x"$pkg_config_exists" = x"0"; then - systemd_unit_dir=`pkg-config systemd --variable=systemdsystemunitdir` - else - systemd_unit_dir="/etc/systemd/system/" - fi - ] -) - -AC_SUBST(logrotate_conf_dir) -AC_ARG_WITH( - logrotate-conf-dir, - AS_HELP_STRING( - [--with-logrotateconfdir=DIR], - [logrotate conf directory @<:@LOGROTATE_CONF_DIR@:>@ - Defaults to the correct value for debian /etc/logrotate.d/] - ), - [ - logrotate_conf_dir="$withval" - ], - [ - case $host in - *-apple-darwin*) - logrotate_conf_dir="" - ;; - *) - logrotate_conf_dir="/etc/logrotate.d/" - ;; - esac - ] -) -AC_SUBST(newsyslog_conf_dir) -AC_ARG_WITH( - newsyslog-conf-dir, - AS_HELP_STRING( - [--with-newsyslogconfdir=DIR], - [newsyslog conf directory @<:@NEWSYSLOG_CONF_DIR@:>@ - Defaults to the correct value for Mac OS X /etc/newsyslog.d/] - ), - [ - newsyslog_conf_dir="$withval" - ], - [ - case $host in - *-apple-darwin*) - newsyslog_conf_dir="/etc/newsyslog.d/" - ;; - *) - newsyslog_conf_dir="" - ;; - esac - ] -) - ################################## #### Checks for header files. #### ################################## @@ -486,14 +421,6 @@ LIBS="$LIBS $MONGOC_LIBS" FREEDIAMETER_DIR=freeDiameter-1.2.1 AC_SUBST(FREEDIAMETER_DIR) -##################### -#### Misc. #### -##################### -current_user=`id -u -n` -AC_SUBST(current_user) -current_group=`id -g -n` -AC_SUBST(current_group) - ##################### #### Conclusion. #### ##################### @@ -502,11 +429,7 @@ AC_CONFIG_SUBDIRS([lib/freeDiameter-1.2.1]) AC_CONFIG_FILES([lib/core/include/core.h]) AC_CONFIG_FILES([lib/core/src/Makefile]) -case $host in - *) - AC_CONFIG_FILES([lib/core/src/unix/Makefile]) - ;; -esac +AC_CONFIG_FILES([lib/core/src/unix/Makefile]) AC_CONFIG_FILES([lib/core/test/Makefile]) AC_CONFIG_FILES([lib/core/Makefile]) AC_CONFIG_FILES([lib/logger/Makefile]) @@ -515,7 +438,6 @@ AC_CONFIG_FILES([lib/s1ap/asn1c/Makefile]) AC_CONFIG_FILES([lib/s1ap/Makefile]) AC_CONFIG_FILES([lib/nas/Makefile]) AC_CONFIG_FILES([lib/fd/extensions/dbg_msg_dumps/Makefile]) -#AC_CONFIG_FILES([lib/fd/extensions/dict_legacy_xml/Makefile]) AC_CONFIG_FILES([lib/fd/extensions/dict_rfc5777/Makefile]) AC_CONFIG_FILES([lib/fd/extensions/dict_mip6i/Makefile]) AC_CONFIG_FILES([lib/fd/extensions/dict_nasreq/Makefile]) @@ -536,18 +458,20 @@ AC_CONFIG_FILES([src/sgw/Makefile]) AC_CONFIG_FILES([src/pgw/Makefile]) AC_CONFIG_FILES([src/pcrf/Makefile]) AC_CONFIG_FILES([src/Makefile]) +AC_CONFIG_FILES([support/config/nextepc.conf]) +AC_CONFIG_FILES([support/config/Makefile]) AC_CONFIG_FILES([support/freeDiameter/mme.conf]) AC_CONFIG_FILES([support/freeDiameter/hss.conf]) AC_CONFIG_FILES([support/freeDiameter/pgw.conf]) AC_CONFIG_FILES([support/freeDiameter/pcrf.conf]) -#AC_CONFIG_FILES([support/freeDiameter/dict_legacy_xml.conf]) AC_CONFIG_FILES([support/freeDiameter/Makefile]) -AC_CONFIG_FILES([support/systemd/Makefile]) +AC_CONFIG_FILES([support/systemd/nextepc-mmed.service]) +AC_CONFIG_FILES([support/systemd/nextepc-sgwd.service]) +AC_CONFIG_FILES([support/systemd/nextepc-pgwd.service]) +AC_CONFIG_FILES([support/systemd/nextepc-hssd.service]) +AC_CONFIG_FILES([support/systemd/nextepc-pcrfd.service]) AC_CONFIG_FILES([support/logrotate/nextepc]) -AC_CONFIG_FILES([support/logrotate/Makefile]) AC_CONFIG_FILES([support/newsyslog/nextepc.conf]) -AC_CONFIG_FILES([support/newsyslog/Makefile]) -AC_CONFIG_FILES([support/nextepc.conf]) AC_CONFIG_FILES([support/Makefile]) AC_CONFIG_FILES([test/Makefile]) AC_CONFIG_FILES([Makefile]) @@ -562,6 +486,7 @@ source code location : ${srcdir} compiler : ${CC} compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} ${LIBS} -config file directory : `eval echo \`echo ${sysconfdir}\`` -log file directory : `eval echo \`echo ${prefix}/var/log\`` +exec directory : ${BIN_DIR} +config directory : ${SYSCONF_DIR}/nextepc +log directory : ${LOCALSTATE_DIR}/log/nextepc " diff --git a/lib/base/context.c b/lib/base/context.c index 6b24efbb8..0bce1f5e3 100644 --- a/lib/base/context.c +++ b/lib/base/context.c @@ -6,8 +6,6 @@ #include "context.h" -#define DEFAULT_CONFIG_FILE_PATH SYSCONF_DIR PACKAGE ".conf" - static context_t self; static int context_initialized = 0; @@ -39,7 +37,7 @@ context_t* context_self() return &self; } -status_t context_read_file(char *file_path) +status_t context_read_file() { char buf[MAX_ERROR_STRING_LEN]; config_t *config = &self.config; @@ -50,8 +48,7 @@ status_t context_read_file(char *file_path) size_t json_len; int result; - config->path = file_path; - if (config->path == NULL) config->path = DEFAULT_CONFIG_FILE_PATH; + d_assert(config->path, return CORE_ERROR,); rv = file_open(&file, config->path, FILE_READ, FILE_OS_DEFAULT); if (rv != CORE_OK) diff --git a/lib/base/context.h b/lib/base/context.h index 099e1c82d..8e0437dc9 100644 --- a/lib/base/context.h +++ b/lib/base/context.h @@ -51,7 +51,7 @@ CORE_DECLARE(status_t) context_init(void); CORE_DECLARE(status_t) context_final(void); CORE_DECLARE(context_t*) context_self(void); -CORE_DECLARE(status_t) context_read_file(char *file_path); +CORE_DECLARE(status_t) context_read_file(void); CORE_DECLARE(status_t) context_parse_config(void); CORE_DECLARE(status_t) context_setup_trace_module(void); diff --git a/lib/freeDiameter-1.2.1/configure.ac b/lib/freeDiameter-1.2.1/configure.ac index 0795a3d10..0d16cf429 100644 --- a/lib/freeDiameter-1.2.1/configure.ac +++ b/lib/freeDiameter-1.2.1/configure.ac @@ -14,9 +14,6 @@ dnl Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign]) -# Minimum Autoconf version required. -AC_PREREQ(2.63) - # Where to generate output; srcdir location. AC_CONFIG_HEADERS([include/freeDiameter/config.h]) AC_CANONICAL_HOST @@ -66,17 +63,16 @@ AH_BOTTOM([ #endif /* FD_IS_CONFIG */ ]) +dnl kernel style compile messages +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + dnl Checks CC and freinds +AC_PROG_MAKE_SET AC_PROG_CC -AC_PROG_CPP AC_PROG_INSTALL -AC_PROG_AWK -AC_PROG_SED AC_PROG_YACC AC_PROG_LEX AM_PROG_AR - -dnl libtool LT_INIT([dlopen]) dnl Check Endian @@ -176,6 +172,6 @@ source code location : ${srcdir} compiler : ${CC} compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} ${LIBS} -default conf path : `eval echo \`echo ${prefix}/etc/freeDiameter\`` -default extention path : `eval echo \`echo ${prefix}/lib/freeDiameter\`` +config directory : `eval echo \`echo ${sysconfdir}/freeDiameter\`` +extention directory : `eval echo \`echo ${localstatedir}/freeDiameter\`` " diff --git a/src/Makefile.am b/src/Makefile.am index 8465c16c2..fdc0d0852 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,7 +83,9 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ -Wall -Werror -DEFS = @DEFS@ -DLOCALSTATE_DIR=\"$(localstatedir)/\" +DEFS = @DEFS@ \ + -DSYSCONF_DIR=\"$(sysconfdir)/\" \ + -DLOCALSTATE_DIR=\"$(localstatedir)/\" MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump diff --git a/src/init.c b/src/init.c index 8a6ef935f..3ce940a7d 100644 --- a/src/init.c +++ b/src/init.c @@ -9,7 +9,8 @@ #include "app.h" -#define DEFAULT_PID_DIR_PATH LOCALSTATE_DIR "run/nextepc/" +#define DEFAULT_PID_DIR_PATH LOCALSTATE_DIR "run/" PACKAGE +#define DEFAULT_CONFIG_FILE_PATH SYSCONF_DIR PACKAGE "/nextepc.conf" static thread_id logger_thread = 0; static void *THREAD_FUNC logger_main(thread_id id, void *data); @@ -21,7 +22,11 @@ status_t app_will_initialize(char *config_path, char *log_path) context_init(); - rv = context_read_file(config_path); + context_self()->config.path = config_path; + if (context_self()->config.path == NULL) + context_self()->config.path = DEFAULT_CONFIG_FILE_PATH; + + rv = context_read_file(); if (rv != CORE_OK) return rv; rv = context_parse_config(); @@ -126,7 +131,7 @@ status_t app_log_pid(const char *name) d_assert(name, return CORE_ERROR, ); - snprintf(fname, sizeof(fname), "%s%sd.pid", DEFAULT_PID_DIR_PATH, name); + snprintf(fname, sizeof(fname), "%s/%sd.pid", DEFAULT_PID_DIR_PATH, name); mypid = getpid(); if (mypid != saved_pid && file_stat(&finfo, fname, FILE_INFO_MTIME) == CORE_OK) diff --git a/support/Makefile.am b/support/Makefile.am index e25eaf64d..13a024ee1 100644 --- a/support/Makefile.am +++ b/support/Makefile.am @@ -1,8 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = freeDiameter - -sysconf_DATA = nextepc.conf +SUBDIRS = config freeDiameter MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump diff --git a/support/config/Makefile.am b/support/config/Makefile.am new file mode 100644 index 000000000..8c9f1b6ad --- /dev/null +++ b/support/config/Makefile.am @@ -0,0 +1,8 @@ +configfiles = nextepc.conf + +configdir = ${sysconfdir}/nextepc + +config_DATA = ${configfiles} + +MAINTAINERCLEANFILES = Makefile.in +MOSTLYCLEANFILES = *.stackdump diff --git a/support/nextepc.conf.in b/support/config/nextepc.conf.in similarity index 83% rename from support/nextepc.conf.in rename to support/config/nextepc.conf.in index b5ceab6ea..3236c5326 100644 --- a/support/nextepc.conf.in +++ b/support/config/nextepc.conf.in @@ -19,7 +19,7 @@ MME : { - FD_CONF_PATH : "@SYSCONF_DIR@/freeDiameter/mme.conf", + FD_CONF_PATH : "@SYSCONF_DIR@/nextepc/freeDiameter/mme.conf", DEFAULT_PAGING_DRX : "v64", #RELATIVE_CAPACITY : 255, NETWORK : @@ -59,7 +59,7 @@ HSS : { - FD_CONF_PATH : "@SYSCONF_DIR@/freeDiameter/hss.conf", + FD_CONF_PATH : "@SYSCONF_DIR@/nextepc/freeDiameter/hss.conf", } SGW : @@ -75,7 +75,7 @@ PGW : { - FD_CONF_PATH : "@SYSCONF_DIR@/freeDiameter/pgw.conf", + FD_CONF_PATH : "@SYSCONF_DIR@/nextepc/freeDiameter/pgw.conf", NETWORK : { GTPC_IPV4: "127.76.0.3", @@ -97,7 +97,7 @@ PCRF : { - FD_CONF_PATH : "@SYSCONF_DIR@/freeDiameter/pcrf.conf", + FD_CONF_PATH : "@SYSCONF_DIR@/nextepc/freeDiameter/pcrf.conf", } } diff --git a/support/freeDiameter/Makefile.am b/support/freeDiameter/Makefile.am index ca707b869..6ac64f1c3 100644 --- a/support/freeDiameter/Makefile.am +++ b/support/freeDiameter/Makefile.am @@ -1,13 +1,11 @@ -freeDiameterdir = ${sysconfdir}/freeDiameter - -freeDiameter_DATA = \ +configfiles = \ mme.conf \ hss.conf \ pgw.conf \ pcrf.conf \ - $(NULL) + $(NULL) -dist_freeDiameter_DATA = \ +pemfiles = \ cacert.pem \ mme.key.pem \ mme.cert.pem \ @@ -17,7 +15,11 @@ dist_freeDiameter_DATA = \ pgw.cert.pem \ pcrf.key.pem \ pcrf.cert.pem \ - $(NULL) + $(NULL) + +freeDiameterdir = ${sysconfdir}/nextepc/freeDiameter + +freeDiameter_DATA = ${configfiles} ${pemfiles} MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump diff --git a/support/freeDiameter/dict_legacy_xml.conf.in b/support/freeDiameter/dict_legacy_xml.conf.in deleted file mode 100644 index 43d4b9696..000000000 --- a/support/freeDiameter/dict_legacy_xml.conf.in +++ /dev/null @@ -1,15 +0,0 @@ -# This file documents the configuration format for the dict_legacy_xml.fdx freeDiameter extension. -# In order to load this extension, please refer to main freeDiameter.conf manual. - -# This extension allows the use of Diameter dictionary files in XML format, -# as roughly specified in draft-frascone-xml-dictionary-00. -# (the actual format is the one from OpenDiameter latest version) -# Note that this format, although more widely used, is less efficient than the -# internal freeDiameter format. It is recommended when possible to use the later. - -# You may refer to the contrib/dict_legacy/README file for information on where to find such resources. - -# This file simply consists in a list of XML dictionary files that must be parsed. -# Example: -# "/etc/freeDiameter/dictionary.xml"; -"@SYSCONF_DIR@/freeDiameter/dict_gx.xml"; diff --git a/support/freeDiameter/hss.conf.in b/support/freeDiameter/hss.conf.in index 2dcc64e12..fcfe1bef6 100644 --- a/support/freeDiameter/hss.conf.in +++ b/support/freeDiameter/hss.conf.in @@ -107,7 +107,7 @@ ListenOn = "127.76.0.4"; # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; -TLS_Cred = "@SYSCONF_DIR@/freeDiameter/hss.cert.pem", "@SYSCONF_DIR@/freeDiameter/hss.key.pem"; +TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/hss.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/hss.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) @@ -115,7 +115,7 @@ TLS_Cred = "@SYSCONF_DIR@/freeDiameter/hss.cert.pem", "@SYSCONF_DIR@/freeDiamete # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; -TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem"; +TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. diff --git a/support/freeDiameter/mme.conf.in b/support/freeDiameter/mme.conf.in index 0569dbdcc..f4f49dfe5 100644 --- a/support/freeDiameter/mme.conf.in +++ b/support/freeDiameter/mme.conf.in @@ -107,7 +107,7 @@ ListenOn = "127.76.0.1"; # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; -TLS_Cred = "@SYSCONF_DIR@/freeDiameter/mme.cert.pem", "@SYSCONF_DIR@/freeDiameter/mme.key.pem"; +TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/mme.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/mme.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) @@ -115,7 +115,7 @@ TLS_Cred = "@SYSCONF_DIR@/freeDiameter/mme.cert.pem", "@SYSCONF_DIR@/freeDiamete # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; -TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem"; +TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. diff --git a/support/freeDiameter/pcrf.conf.in b/support/freeDiameter/pcrf.conf.in index e30ea20dd..4448025b6 100644 --- a/support/freeDiameter/pcrf.conf.in +++ b/support/freeDiameter/pcrf.conf.in @@ -107,7 +107,7 @@ ListenOn = "127.76.0.5"; # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; -TLS_Cred = "@SYSCONF_DIR@/freeDiameter/pcrf.cert.pem", "@SYSCONF_DIR@/freeDiameter/pcrf.key.pem"; +TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/pcrf.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/pcrf.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) @@ -115,7 +115,7 @@ TLS_Cred = "@SYSCONF_DIR@/freeDiameter/pcrf.cert.pem", "@SYSCONF_DIR@/freeDiamet # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; -TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem"; +TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. @@ -230,7 +230,7 @@ LoadExtension = "@LIB_DIR@/nextepc/dict_nasreq.so"; LoadExtension = "@LIB_DIR@/nextepc/dict_nas_mipv6.so"; LoadExtension = "@LIB_DIR@/nextepc/dict_dcca.so"; LoadExtension = "@LIB_DIR@/nextepc/dict_dcca_3gpp.so"; -#LoadExtension = "@LIB_DIR@/nextepc/dict_legacy_xml.so" : "@SYSCONF_DIR@/freeDiameter/dict_legacy_xml.conf"; +#LoadExtension = "@LIB_DIR@/nextepc/dict_legacy_xml.so" : "@SYSCONF_DIR@/nextepc/freeDiameter/dict_legacy_xml.conf"; ############################################################## diff --git a/support/freeDiameter/pgw.conf.in b/support/freeDiameter/pgw.conf.in index 07947a4c1..d42de441a 100644 --- a/support/freeDiameter/pgw.conf.in +++ b/support/freeDiameter/pgw.conf.in @@ -107,7 +107,7 @@ ListenOn = "127.76.0.3"; # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; -TLS_Cred = "@SYSCONF_DIR@/freeDiameter/pgw.cert.pem", "@SYSCONF_DIR@/freeDiameter/pgw.key.pem"; +TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/pgw.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/pgw.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) @@ -115,7 +115,7 @@ TLS_Cred = "@SYSCONF_DIR@/freeDiameter/pgw.cert.pem", "@SYSCONF_DIR@/freeDiamete # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; -TLS_CA = "@SYSCONF_DIR@/freeDiameter/cacert.pem"; +TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. @@ -230,7 +230,7 @@ LoadExtension = "@LIB_DIR@/nextepc/dict_nasreq.so"; LoadExtension = "@LIB_DIR@/nextepc/dict_nas_mipv6.so"; LoadExtension = "@LIB_DIR@/nextepc/dict_dcca.so"; LoadExtension = "@LIB_DIR@/nextepc/dict_dcca_3gpp.so"; -#LoadExtension = "@LIB_DIR@/nextepc/dict_legacy_xml.so" : "@SYSCONF_DIR@/freeDiameter/dict_legacy_xml.conf"; +#LoadExtension = "@LIB_DIR@/nextepc/dict_legacy_xml.so" : "@SYSCONF_DIR@/nextepc/freeDiameter/dict_legacy_xml.conf"; ############################################################## diff --git a/support/logrotate/Makefile.am b/support/logrotate/Makefile.am deleted file mode 100644 index 0d44770c2..000000000 --- a/support/logrotate/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -confdir = ${logrotate_conf_dir} -conf_DATA = nextepc - -MAINTAINERCLEANFILES = Makefile.in -MOSTLYCLEANFILES = *.stackdump diff --git a/support/logrotate/nextepc.in b/support/logrotate/nextepc.in index 08d07739c..fd619cb3a 100644 --- a/support/logrotate/nextepc.in +++ b/support/logrotate/nextepc.in @@ -4,7 +4,7 @@ missingok compress rotate 14 - create 640 @current_user@ @current_group@ + create 640 nextepc nextepc postrotate for i in pcrfd pgwd sgwd hssd mmed epcd; do diff --git a/support/netconfig.sh b/support/netconfig.sh index 041ad6209..2490f741f 100755 --- a/support/netconfig.sh +++ b/support/netconfig.sh @@ -3,11 +3,8 @@ SYSTEM=`uname`; if [ "$SYSTEM" = "Linux" ]; then - ifconfig lo:mme 127.76.0.1 netmask 255.255.255.255 up - ifconfig lo:sgw 127.76.0.2 netmask 255.255.255.255 up - ifconfig lo:pgw 127.76.0.3 netmask 255.255.255.255 up - ifconfig lo:hss 127.76.0.4 netmask 255.255.255.255 up - ifconfig lo:pcrf 127.76.0.5 netmask 255.255.255.255 up + sudo ip tuntap add name pgwtun mode tun + sudo ifconfig pgwtun 45.45.0.1/16 up else ifconfig lo0 alias 127.76.0.1 netmask 255.255.255.255 ifconfig lo0 alias 127.76.0.2 netmask 255.255.255.255 diff --git a/support/newsyslog/Makefile.am b/support/newsyslog/Makefile.am deleted file mode 100644 index 0b66f4041..000000000 --- a/support/newsyslog/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -confdir = ${newsyslog_conf_dir} -conf_DATA = nextepc.conf - -MAINTAINERCLEANFILES = Makefile.in -MOSTLYCLEANFILES = *.stackdump diff --git a/support/systemd/Makefile.am b/support/systemd/Makefile.am deleted file mode 100644 index 508e116d7..000000000 --- a/support/systemd/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -unitfiles = \ - nextepc-mmed.service \ - nextepc-sgwd.service \ - nextepc-pgwd.service \ - nextepc-pcrfd.service \ - nextepc-hssd.service \ - $(NULL) - -unitdir = ${systemd_unit_dir} - -unit_DATA = $(unitfiles) - -EXTRA_DIST = $(unitfiles) - -MAINTAINERCLEANFILES = Makefile.in -MOSTLYCLEANFILES = *.stackdump diff --git a/support/systemd/nextepc-hssd.service b/support/systemd/nextepc-hssd.service.in similarity index 72% rename from support/systemd/nextepc-hssd.service rename to support/systemd/nextepc-hssd.service.in index a1d994227..d4a7d66d0 100644 --- a/support/systemd/nextepc-hssd.service +++ b/support/systemd/nextepc-hssd.service.in @@ -5,7 +5,7 @@ After=networking.service [Service] Type=simple Restart=always -ExecStart=/usr/bin/nextepc-hssd -f /etc/nextepc/hss.cfg +ExecStart=@BIN_DIR@/nextepc-hssd -f @SYSCONF_DIR@/nextepc/hss.conf RestartSec=2 RestartPreventExitStatus=1 diff --git a/support/systemd/nextepc-mmed.service b/support/systemd/nextepc-mmed.service.in similarity index 72% rename from support/systemd/nextepc-mmed.service rename to support/systemd/nextepc-mmed.service.in index 0eae78592..8073162e9 100644 --- a/support/systemd/nextepc-mmed.service +++ b/support/systemd/nextepc-mmed.service.in @@ -5,7 +5,7 @@ After=networking.service [Service] Type=simple Restart=always -ExecStart=/usr/bin/nextepc-mmed -f /etc/nextepc/mme.cfg +ExecStart=@BIN_DIR@/nextepc-mmed -f @SYSCONF_DIR@/nextepc/mme.conf RestartSec=2 RestartPreventExitStatus=1 diff --git a/support/systemd/nextepc-pcrfd.service b/support/systemd/nextepc-pcrfd.service.in similarity index 72% rename from support/systemd/nextepc-pcrfd.service rename to support/systemd/nextepc-pcrfd.service.in index bb42f63e0..b9c59a495 100644 --- a/support/systemd/nextepc-pcrfd.service +++ b/support/systemd/nextepc-pcrfd.service.in @@ -5,7 +5,7 @@ After=networking.service [Service] Type=simple Restart=always -ExecStart=/usr/bin/nextepc-pcrfd -f /etc/nextepc/pcrfd.cfg +ExecStart=@BIN_DIR@/nextepc-pcrfd -f @SYSCONF_DIR@/nextepc/pcrf.conf RestartSec=2 RestartPreventExitStatus=1 diff --git a/support/systemd/nextepc-sgwd.service b/support/systemd/nextepc-pgwd.service.in similarity index 72% rename from support/systemd/nextepc-sgwd.service rename to support/systemd/nextepc-pgwd.service.in index 5169eefdb..5e040b248 100644 --- a/support/systemd/nextepc-sgwd.service +++ b/support/systemd/nextepc-pgwd.service.in @@ -5,7 +5,7 @@ After=networking.service [Service] Type=simple Restart=always -ExecStart=/usr/bin/nextepc-sgwd -f /etc/nextepc/sgw.cfg +ExecStart=@BIN_DIR@/nextepc-pgwd -f @SYSCONF_DIR@/nextepc/pgw.conf RestartSec=2 RestartPreventExitStatus=1 diff --git a/support/systemd/nextepc-pgwd.service b/support/systemd/nextepc-sgwd.service.in similarity index 72% rename from support/systemd/nextepc-pgwd.service rename to support/systemd/nextepc-sgwd.service.in index 126140aa6..0666ef3ef 100644 --- a/support/systemd/nextepc-pgwd.service +++ b/support/systemd/nextepc-sgwd.service.in @@ -5,7 +5,7 @@ After=networking.service [Service] Type=simple Restart=always -ExecStart=/usr/bin/nextepc-pgwd -f /etc/nextepc/pgw.cfg +ExecStart=@BIN_DIR@/nextepc-sgwd -f @SYSCONF_DIR@/nextepc/sgw.conf RestartSec=2 RestartPreventExitStatus=1