Skip to content

Commit cf81803

Browse files
committed
radius: move custom install inside module
Thanks go to Nick Altman for reporting this
1 parent 70a34b9 commit cf81803

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Makefile

-11
Original file line numberDiff line numberDiff line change
@@ -517,17 +517,6 @@ install-cfg: $(cfg-prefix)/$(cfg-dir)
517517
mv -f $(cfg-prefix)/$(cfg-dir)$(NAME).cfg.sample \
518518
$(cfg-prefix)/$(cfg-dir)$(NAME).cfg; \
519519
fi
520-
# radius dictionary
521-
if [ "$(RADIUSDEPON)" = "yes" ]; then \
522-
$(INSTALL_TOUCH) \
523-
$(cfg-prefix)/$(cfg-dir)/dictionary.opensips.sample ; \
524-
$(INSTALL_CFG) etc/dictionary.opensips \
525-
$(cfg-prefix)/$(cfg-dir)/dictionary.opensips.sample ; \
526-
if [ ! -f $(cfg-prefix)/$(cfg-dir)/dictionary.opensips ]; then \
527-
mv -f $(cfg-prefix)/$(cfg-dir)/dictionary.opensips.sample \
528-
$(cfg-prefix)/$(cfg-dir)/dictionary.opensips; \
529-
fi; \
530-
fi
531520
# opensipsctl config
532521
$(INSTALL_TOUCH) $(cfg-prefix)/$(cfg-dir)/opensipsctlrc.sample
533522
$(INSTALL_CFG) scripts/opensipsctlrc \

modules/aaa_radius/Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ include ../../Makefile.defs
88
auto_gen=
99
NAME=aaa_radius.so
1010

11+
ETC_DIR?=../../etc/
12+
1113
# Comment the next two line and uncomment the following two if you want
1214
# to enable Radius support
1315
DEFS+= -I$(LOCALBASE)/include
1416
LIBS=-L$(LOCALBASE)/lib $(RADIUS_LIB)
1517

1618
include ../../Makefile.modules
19+
20+
install_module_custom: $(cfg-prefix)/$(cfg-dir)
21+
$(INSTALL_TOUCH) \
22+
$(cfg-prefix)/$(cfg-dir)/dictionary.opensips.sample ; \
23+
$(INSTALL_CFG) $(ETC_DIR)/dictionary.opensips \
24+
$(cfg-prefix)/$(cfg-dir)/dictionary.opensips.sample ; \
25+
if [ ! -f $(cfg-prefix)/$(cfg-dir)/dictionary.opensips ]; then \
26+
mv -f $(cfg-prefix)/$(cfg-dir)/dictionary.opensips.sample \
27+
$(cfg-prefix)/$(cfg-dir)/dictionary.opensips; \
28+
fi; \

0 commit comments

Comments
 (0)