diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-01-25 17:11:17 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-01-25 17:11:17 +0000 |
commit | 56bc02a305ae8d8a7e927622d924cdab56d4f012 (patch) | |
tree | 079702f93a3ad4420b99f31bc99c1b9b2b9a8a08 /package/base-files/Makefile | |
parent | 35170c48928e99dda69d46274c2749bc9bff972d (diff) | |
download | upstream-56bc02a305ae8d8a7e927622d924cdab56d4f012.tar.gz upstream-56bc02a305ae8d8a7e927622d924cdab56d4f012.tar.bz2 upstream-56bc02a305ae8d8a7e927622d924cdab56d4f012.zip |
add preinit modularization work by Daniel Dickinson (cshore)
SVN-Revision: 19331
Diffstat (limited to 'package/base-files/Makefile')
-rw-r--r-- | package/base-files/Makefile | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index fb30b94ab9..6912cc5b4a 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2007-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -298,6 +299,22 @@ define Package/ldconfig/config endef +define ImageConfigOptions + mkdir -p $(1)/lib/preinit + echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf + echo 'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),2)' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_init_path=$(if $(CONFIG_TARGET_INIT_PATH),$(CONFIG_TARGET_INIT_PATH),"/bin:/sbin:/usr/bin:/usr/sbin")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_netmask=$(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf +endef + define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef @@ -362,6 +379,7 @@ define Package/base-files/install ln -sf /tmp $(1)/var mkdir -p $(1)/etc ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/ + $(call ImageConfigOptions,$(1)) $(call Package/base-files/install-target,$(1)) for conffile in $(1)/etc/config/*; do \ if [ -f "$$$$conffile" ]; then \ |