mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-26 23:13:27 +08:00
initscripts: new package
The folder init.d is currently installed by default since it's part of our skeleton. This patch creates a package out of it and make busybox/sysvinit depends on it. This way, if you chose another init, you don't end up with a useless init.d folder. [Thomas: - make the initscripts package selectable via a hidden bool - remove some unneeded changes in sysvinit.mk.] Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
4d1a9d8cd8
commit
89d39fc7a3
@ -1414,6 +1414,7 @@ endif
|
||||
source "package/ftop/Config.in"
|
||||
source "package/getent/Config.in"
|
||||
source "package/htop/Config.in"
|
||||
source "package/initscripts/Config.in"
|
||||
source "package/iotop/Config.in"
|
||||
source "package/iprutils/Config.in"
|
||||
source "package/irqbalance/Config.in"
|
||||
|
@ -148,6 +148,12 @@ define BUSYBOX_INSTALL_LOGGING_SCRIPT
|
||||
else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_INIT_BUSYBOX),y)
|
||||
define BUSYBOX_INSTALL_INITTAB
|
||||
$(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y)
|
||||
define BUSYBOX_SET_WATCHDOG
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG))
|
||||
@ -205,6 +211,7 @@ endef
|
||||
|
||||
define BUSYBOX_INSTALL_TARGET_CMDS
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
|
||||
$(BUSYBOX_INSTALL_INITTAB)
|
||||
$(BUSYBOX_INSTALL_UDHCPC_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_MDEV_CONF)
|
||||
endef
|
||||
|
4
package/initscripts/Config.in
Normal file
4
package/initscripts/Config.in
Normal file
@ -0,0 +1,4 @@
|
||||
config BR2_PACKAGE_INITSCRIPTS
|
||||
bool
|
||||
help
|
||||
The basics startup scripts for both SysV and Busybox
|
15
package/initscripts/initscripts.mk
Normal file
15
package/initscripts/initscripts.mk
Normal file
@ -0,0 +1,15 @@
|
||||
################################################################################
|
||||
#
|
||||
# initscripts
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# source included in buildroot
|
||||
INITSCRIPTS_SOURCE =
|
||||
|
||||
define INITSCRIPTS_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/etc/init.d
|
||||
$(INSTALL) -D -m 0755 package/initscripts/init.d/* $(TARGET_DIR)/etc/init.d/
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -34,8 +34,6 @@ define SYSVINIT_INSTALL_TARGET_CMDS
|
||||
for x in halt init shutdown killall5; do \
|
||||
$(INSTALL) -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \
|
||||
done
|
||||
# Override BusyBox's inittab with an inittab compatible with
|
||||
# sysvinit
|
||||
$(INSTALL) -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab
|
||||
ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot
|
||||
ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff
|
||||
|
@ -70,10 +70,12 @@ choice
|
||||
config BR2_INIT_BUSYBOX
|
||||
bool "BusyBox"
|
||||
select BR2_PACKAGE_BUSYBOX
|
||||
select BR2_PACKAGE_INITSCRIPTS
|
||||
|
||||
config BR2_INIT_SYSV
|
||||
bool "systemV"
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # sysvinit
|
||||
select BR2_PACKAGE_INITSCRIPTS
|
||||
select BR2_PACKAGE_SYSVINIT
|
||||
|
||||
config BR2_INIT_SYSTEMD
|
||||
|
Loading…
Reference in New Issue
Block a user