Browse Source

make installation of package init scripts optional

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Phil Sutter 14 years ago
parent
commit
2d2cde5410
2 changed files with 14 additions and 0 deletions
  1. 12 0
      Config.in
  2. 2 0
      mk/package.mk

+ 12 - 0
Config.in

@@ -46,6 +46,18 @@ endmenu
 
 menu "Package selection"
 depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_SYSTEM
+
+config ADK_INSTALL_PACKAGE_INIT_SCRIPTS
+	boolean "ship custom init-scripts along with packages"
+	default y
+	help
+	  Turning this option to false will prevent the ADK from
+	  installing init-scripts (i.e. files in /etc/init.d) for
+	  certain daemons and daemon-like applications.
+
+	  Note that without further customisation, turning this option
+	  off will almost certainly render the resulting system unusable.
+
 source "package/Config.in.auto.global"
 source "package/Config.in.auto"
 endmenu

+ 2 - 0
mk/package.mk

@@ -181,6 +181,7 @@ $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $${_FAKE_COOKIE}
 ifeq ($(ADK_DEBUG),)
 	$${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE)
 endif
+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##"); \
 		check=$$$$(grep PKG $$$$file|cut -d ' '  -f 2); \
@@ -192,6 +193,7 @@ endif
 		[[ -e $$$$script ]] || continue; \
 		chmod 0755 "$$$$script"; \
 	done
+endif
 	@mkdir -p $${PACKAGE_DIR} '$${STAGING_PKG_DIR}' \
 	    '$${STAGING_TARGET_DIR}/scripts'
 ifeq (,$(filter noremove,$(7)))