[source] preinit: use only the image config options

LEDE Commits lede-commits at lists.infradead.org
Wed Aug 10 02:16:48 PDT 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=5fadd4397b395e5760f3c86751b711688efca6e9

commit 5fadd4397b395e5760f3c86751b711688efca6e9
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Sun Aug 7 22:21:34 2016 +0200

    preinit: use only the image config options
    
    The pi_* variables and the fs_failsafe_wait_timeout variable are set by
    the CONFIG_TARGET_PREINIT_* config options. No need to maintain the same
    values twice.
    
    All other fs_ variables were never used.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 package/base-files/Makefile          |  2 --
 package/base-files/files/etc/preinit | 17 -----------------
 2 files changed, 19 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index a32f345..25fd9f2 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -64,7 +64,6 @@ define Package/base-files/description
  This package contains a base filesystem and system scripts for OpenWrt.
 endef
 
-ifneq ($(CONFIG_PREINITOPT),)
 define ImageConfigOptions
 	mkdir -p $(1)/lib/preinit
 	echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf
@@ -81,7 +80,6 @@ define ImageConfigOptions
 	echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf
 endef
-endif
 
 define Build/Prepare
 	mkdir -p $(PKG_BUILD_DIR)
diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit
index 181b332..829574f 100755
--- a/package/base-files/files/etc/preinit
+++ b/package/base-files/files/etc/preinit
@@ -6,23 +6,6 @@
 
 export PATH="%PATH%"
 
-pi_ifname=
-pi_ip=192.168.1.1
-pi_broadcast=192.168.1.255
-pi_netmask=255.255.255.0
-
-fs_failsafe_ifname=
-fs_failsafe_ip=192.168.1.1
-fs_failsafe_broadcast=192.168.1.255
-fs_failsafe_netmask=255.255.255.0
-
-fs_failsafe_wait_timeout=2
-
-pi_suppress_stderr="y"
-pi_init_suppress_stderr="y"
-pi_init_path="%PATH%"
-pi_init_cmd="/sbin/init"
-
 . /lib/functions.sh
 . /lib/functions/preinit.sh
 . /lib/functions/system.sh



More information about the lede-commits mailing list