[Buildroot] [PATCH 6/6] Add systemd unit for lighttpd

Maxime Ripard maxime.ripard at free-electrons.com
Wed Mar 21 09:24:02 UTC 2012


Le 20/03/2012 00:55, Arnout Vandecappelle a écrit :
> On Monday 19 March 2012 16:59:40 Maxime Ripard wrote:
>> +define LIGHTTPD_INSTALL_INIT_SYSTEMD
>> +[ -f $(TARGET_DIR)/etc/systemd/system/lighttpd.service ] || \
>> +       $(INSTALL) -D -m 755 package/lighttpd/lighttpd.service \
>> +               $(TARGET_DIR)/etc/systemd/system/lighttpd.service
>> +
>> +mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
>> +
>> +ln -fs ../lighttpd.service \
>> +       $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
>> +endef
> 
>  This should be indented, no?
> 
>  Would it be useful to add this to generic package infrastructure?
> I mean, if systemd is selected and pkgdir/pkgname.service exists,
> install it and enable it in multi-user.

I thought so at first, and in my first proposal, that was indeed the
case, but fact is that not every package doesn't want to be in
multi-user targets, but some will want to be in the sockets one, other
in network, etc.

So that's the reason I only added callbacks and let it up to the package
to install its units where they should be.


-- 
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list