diff --git a/Rules.modular b/Rules.modular index 63a10e7ff..f7ee2c11f 100644 --- a/Rules.modular +++ b/Rules.modular @@ -58,6 +58,17 @@ load: $(instpkg) $(appfiles) @$(INSTALL) -d -m 0755 $(policypath) $(dir $(fcpath)) $(verbose) $(SEMODULE) -s $(NAME) -i $(modpkgdir)/$(notdir $(base_pkg)) $(foreach mod,$(mod_pkgs),-i $(modpkgdir)/$(mod)) +######################################## +# +# Load all configured modules and remove foreign ones +# +pure-load: $(instpkg) $(appfiles) +# make sure two directories exist since they are not +# created by semanage + @echo "Loading configured modules." + @$(INSTALL) -d -m 0755 $(policypath) $(dir $(fcpath)) + $(verbose) $(SEMODULE) -s $(NAME) -i $(modpkgdir)/$(notdir $(base_pkg)) $(foreach mod,$(mod_pkgs),-i $(modpkgdir)/$(mod)) $(foreach omod,$(filter-out base $(notdir $(mod_mods:.te=)),$(shell $(SEMODULE) -l)),-r $(omod)) + ######################################## # # Install policy packages @@ -226,4 +237,4 @@ clean: $(verbose) rm -f $(net_contexts) $(net_contexts_nft) $(verbose) rm -fR $(tmpdir) -.PHONY: default all policy base modules install load clean validate +.PHONY: default all policy base modules install load pure-load clean validate