summaryrefslogtreecommitdiffstats
path: root/package/base-files/Makefile
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-03-13 18:11:19 +0000
committerJohn Crispin <john@openwrt.org>2013-03-13 18:11:19 +0000
commitf43b7934d2850c2f545736253a0f8cbe4915fdff (patch)
tree3718ca82dd27e3917a51439823bfb20a067af784 /package/base-files/Makefile
parent1360067c4a75cd1804710e6f25871f695d3271b2 (diff)
downloadmaster-31e0f0ae-f43b7934d2850c2f545736253a0f8cbe4915fdff.tar.gz
master-31e0f0ae-f43b7934d2850c2f545736253a0f8cbe4915fdff.tar.bz2
master-31e0f0ae-f43b7934d2850c2f545736253a0f8cbe4915fdff.zip
make basefiles aware of procd
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36003
Diffstat (limited to 'package/base-files/Makefile')
-rw-r--r--package/base-files/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index b763658549..90c280645d 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -15,6 +15,7 @@ PKG_RELEASE:=134
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host
+PKG_CONFIG_DEPENDS:=CONFIG_PROCD_INIT
include $(INCLUDE_DIR)/package.mk
@@ -55,6 +56,18 @@ define Package/base-files/description
This package contains a base filesystem and system scripts for OpenWrt.
endef
+define Package/base-files/config
+config PROCD_INIT
+ bool "Use procd as the init process"
+ default n
+endef
+
+ifeq ($(CONFIG_PROCD_INIT),)
+define InstallOldFiles
+ $(CP) ./files.old/* $(1)/
+endef
+endif
+
ifneq ($(CONFIG_PREINITOPT),)
define ImageConfigOptions
mkdir -p $(1)/lib/preinit
@@ -87,6 +100,7 @@ define Package/base-files/install
if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
fi
+ $(call InstallOldFiles,$(1))
if [ -d $(PLATFORM_DIR)/base-files/. ]; then \
$(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \
fi