From 6eb624f2ea2133cfb5d8f9a6e8633c386a75a8f9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 12 Jan 2012 19:36:25 +0100 Subject: Allow leaving /etc as untouched as possible For customized setups, it's hard to control what files get installed into /etc since in addition to the base-files package, any other package may install a sample config. When two packages provide the same file, which one of them makes it into the image depends on the order of them being installed. Solving this problem is not as trivial, as there are packages which must be allowed to install stuff into /etc. Best examples are base-files and ca-certificates. This patch solves the problem by adding another PKG_template flag "force_etc", which one can define in order to override the as well new Config.in symbol "ADK_LEAVE_ETC_ALONE". --- mk/package.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mk/package.mk') diff --git a/mk/package.mk b/mk/package.mk index 07f53aa34..e69b7866f 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -159,6 +159,9 @@ endif ifeq ($(ADK_DEBUG_STRIP),y) $${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE) endif +ifeq (${ADK_LEAVE_ETC_ALONE}$(filter force_etc,$(7)),y) + -rm -rf $${IDIR_$(1)}/etc +else ifeq (${ADK_INSTALL_PACKAGE_INIT_SCRIPTS},y) @for file in $$$$(ls ./files/*.init 2>/dev/null); do \ fname=$$$$(echo $$$$file| sed -e "s#.*/##" -e "s#.init##"); \ @@ -171,6 +174,10 @@ ifeq (${ADK_INSTALL_PACKAGE_INIT_SCRIPTS},y) [[ -e $$$$script ]] || continue; \ chmod 0755 "$$$$script"; \ done +endif +ifneq (${ADK_INSTALL_PACKAGE_NETWORK_SCRIPTS},y) + -rm -rf $${IDIR_$(1)}/etc/network +endif endif @mkdir -p $${PACKAGE_DIR} '$${STAGING_PKG_DIR}' \ '$${STAGING_DIR}/scripts' -- cgit v1.2.3