From 71ab2c9d179652d9b528817ec04d3f1dd3b4b1df Mon Sep 17 00:00:00 2001 From: Richard Musil Date: Thu, 9 May 2019 03:45:07 +0200 Subject: imagebuilder: new DISABLED_SERVICES make variable Adds a new variable DISABLED_SERVICES to ImageBuilder Makefile, which defines a list of services (installed as /etc/init.d/*) to be disabled during the build of a custom image (normally all are enabled). It comes handy when a particular service should not be run under normal circumstances, but should be ready in the image for situations when it might be needed. Signed-off-by: Richard Musil --- target/imagebuilder/files/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'target/imagebuilder') diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 547289b971..22b2731358 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -45,6 +45,7 @@ Building images: make image FILES="" # include extra files from make image BIN_DIR="" # alternative output directory for the images make image EXTRA_IMAGE_NAME="" # Add this to the output image filename (sanitized) + make image DISABLED_SERVICES=" [ [ ..]]" # Which services in /etc/init.d/ should be disabled Print manifest: List "all" packages which get installed into the image. @@ -159,7 +160,7 @@ prepare_rootfs: FORCE @echo Finalizing root filesystem... $(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG) - $(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES)) + $(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES)) build_image: FORCE @echo @@ -197,7 +198,8 @@ image: $(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \ $(if $(FILES),USER_FILES="$(FILES)") \ $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \ - $(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)")) + $(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)") \ + $(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)")) manifest: FORCE $(MAKE) -s _check_profile -- cgit v1.2.3