Module: kamailio
Branch: master
Commit: 7464ce3c9c9c742dbb06501190b17cbcad6b45b9
URL:
https://github.com/kamailio/kamailio/commit/7464ce3c9c9c742dbb06501190b17cb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-07T13:16:34+01:00
core: moved radius dictionary files from etc to auth_radius module
---
Added: src/modules/auth_radius/cfg/dictionary.kamailio
Added: src/modules/auth_radius/cfg/dictionary.sip-router
Modified: src/Makefile
Modified: src/modules/auth_radius/Makefile
Removed: etc/dictionary.kamailio
Removed: etc/dictionary.sip-router
---
Diff:
https://github.com/kamailio/kamailio/commit/7464ce3c9c9c742dbb06501190b17cb…
Patch:
https://github.com/kamailio/kamailio/commit/7464ce3c9c9c742dbb06501190b17cb…
---
diff --git a/src/Makefile b/src/Makefile
index dd68f0bf7c..542afa76a3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -766,9 +766,6 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
fi ; \
fi ; \
: ; done; true
- @# radius dictionary
- @$(INSTALL_TOUCH) $(cfg_prefix)/$(cfg_dir)/dictionary.$(CFG_NAME)
- @$(INSTALL_CFG) ../etc/dictionary.$(CFG_NAME) $(cfg_prefix)/$(cfg_dir)
@echo "config files installed"
install-cfg-pkg: $(cfg_prefix)/$(cfg_dir)
diff --git a/src/modules/auth_radius/Makefile b/src/modules/auth_radius/Makefile
index 94a102230e..0e616eede1 100644
--- a/src/modules/auth_radius/Makefile
+++ b/src/modules/auth_radius/Makefile
@@ -13,3 +13,18 @@ NAME=auth_radius.so
DEFS+=-DKAMAILIO_MOD_INTERFACE
include ../../Makefile.modules
+
+install-cfg:
+ @if ! [ -d $(cfg_prefix)/$(cfg_dir) ]; then \
+ mkdir -p "$(cfg_prefix)/$(cfg_dir)" ; \
+ fi
+ @$(call try_err, $(INSTALL_TOUCH) \
+ "$(cfg_prefix)/$(cfg_dir)dictionary.$(CFG_NAME).sample" )
+ @$(call try_err, $(INSTALL_CFG) \
+ "cfg/dictionary.$(CFG_NAME).sample" \
+ "$(cfg_prefix)/$(cfg_dir)" )
+ @if [ -z "${skip_cfg_install}" -a \
+ ! -f "$(cfg_prefix)/$(cfg_dir)dictionary.$(CFG_NAME)" ]; then \
+ mv -f "$(cfg_prefix)/$(cfg_dir)dictionary.$(CFG_NAME).sample" \
+ "$(cfg_prefix)/$(cfg_dir)dictionary.$(CFG_NAME)" ; \
+ fi
diff --git a/etc/dictionary.kamailio b/src/modules/auth_radius/cfg/dictionary.kamailio
similarity index 100%
rename from etc/dictionary.kamailio
rename to src/modules/auth_radius/cfg/dictionary.kamailio
diff --git a/etc/dictionary.sip-router
b/src/modules/auth_radius/cfg/dictionary.sip-router
similarity index 100%
rename from etc/dictionary.sip-router
rename to src/modules/auth_radius/cfg/dictionary.sip-router