[Buildroot] [PATCH 3/5] infra: Add automatic install of init scripts

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Oct 18 17:02:05 UTC 2014


Dear Maxime Hadjinlian,

On Sat, 18 Oct 2014 16:47:02 +0200, Maxime Hadjinlian wrote:

> +ifeq ($(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),y)
> +	$(Q)if test -n "$($(PKG)_INIT_SYSV_FILES)" ; then \
> +		for s in $($(PKG)_INIT_SYSV_FILES); do \
> +			   f=$$(basename $${s}) ; \
> +			   $(INSTALL) -D -m 0755 $${s} $(TARGET_DIR)/etc/init.d/$${f} ; \
> +		done ; \
> +	fi
> +	$($(PKG)_INSTALL_INIT_SYSV)
> +endif

Another comment: you're forcefully installing the init script here,
while many of our packages (but not all!) test if the script is already
installed before installing it. The use case for this is to allow a
custom version of the script to be part of the filesystem skeleton, and
therefore to not see it being overridden by a package.

I personally don't care very much about this use case, as I believe
people should rather use rootfs overlays, and also because it is anyway
not full-proof: while we can prevent the Buildroot package logic from
overwriting files in the root filesystem, we cannot prevent the build
system of each package from overwriting files.

But it's something that needs to be discussed and decided. Peter ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list