diff options
author | Richard Musil <risa2000x@gmail.com> | 2019-05-09 03:45:07 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-05-15 13:34:24 +0200 |
commit | 71ab2c9d179652d9b528817ec04d3f1dd3b4b1df (patch) | |
tree | 5ea0270d77872e2ca8c1e1a6b65aadcc42b19fff /include/rootfs.mk | |
parent | 33ce2ad3e7ea760e3856b88727bc79aaf9c29fc9 (diff) | |
download | upstream-71ab2c9d179652d9b528817ec04d3f1dd3b4b1df.tar.gz upstream-71ab2c9d179652d9b528817ec04d3f1dd3b4b1df.tar.bz2 upstream-71ab2c9d179652d9b528817ec04d3f1dd3b4b1df.zip |
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 <risa2000x@gmail.com>
Diffstat (limited to 'include/rootfs.mk')
-rw-r--r-- | include/rootfs.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/rootfs.mk b/include/rootfs.mk index dc8621dbae..f2d2494ae2 100644 --- a/include/rootfs.mk +++ b/include/rootfs.mk @@ -78,7 +78,13 @@ define prepare_rootfs done; \ for script in ./etc/init.d/*; do \ grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \ - IPKG_INSTROOT=$(1) $$(which bash) ./etc/rc.common $$script enable; \ + if ! echo " $(3) " | grep -q " $$(basename $$script) "; then \ + IPKG_INSTROOT=$(1) $$(which bash) ./etc/rc.common $$script enable; \ + echo "Enabling" $$(basename $$script); \ + else \ + IPKG_INSTROOT=$(1) $$(which bash) ./etc/rc.common $$script disable; \ + echo "Disabling" $$(basename $$script); \ + fi; \ done || true \ ) $(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status) |