[Buildroot] [PATCH v3 02/13] package/dhcp: systemd: rename environment file

Benoît Thébaudeau benoit at wsystem.com
Wed Nov 4 10:01:24 UTC 2015


Hi Maxime, all,

On 04/11/2015 10:54, Maxime Hadjinlian wrote:
> 
> 
> On Wed, Nov 4, 2015 at 10:52 AM, Maxime Hadjinlian <maxime.hadjinlian at gmail.com <mailto:maxime.hadjinlian at gmail.com>> wrote:
> 
>     Hi Benoit, all
> 
>     On Sun, Oct 25, 2015 at 2:59 AM, Benoît Thébaudeau <benoit.thebaudeau.dev at gmail.com <mailto:benoit.thebaudeau.dev at gmail.com>> wrote:
> 
>         Use the same EnvironmentFile name as the SysV init script for
>         consistency. The filenames under /etc/default/ are usually just the
>         package/daemon/service/feature name without any extension, so remove the
>         ".conf" extension from EnvironmentFile.
> 
>         Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev at gmail.com <mailto:benoit.thebaudeau.dev at gmail.com>>
> 
>         ---
>         Changes v2 -> v3: new patch.
>         ---
>          package/dhcp/dhcpd.service | 2 +-
>          1 file changed, 1 insertion(+), 1 deletion(-)
> 
>         diff --git a/package/dhcp/dhcpd.service b/package/dhcp/dhcpd.service
>         index 7b265cb..5989506 100644
>         --- a/package/dhcp/dhcpd.service
>         +++ b/package/dhcp/dhcpd.service
>         @@ -7,7 +7,7 @@ Type=forking
>          PIDFile=/run/dhcpd.pid
>          ExecStart=/usr/sbin/dhcpd -q -pf /run/dhcpd.pid $INTERFACES
>          KillSignal=SIGINT
>         -EnvironmentFile=/etc/default/dhcpd.conf
>         +EnvironmentFile=/etc/default/dhcpd
> 
>     Maybe this should be:
>     EnvironmentFile-=/etc/default/dhcpd
> 
>     Notice the '-' before the '=', in case the file doesn't exists, it won't print a warning or error the whole service.
> 
> My mistake, the '-' should be *AFTER* the '='.

See 06/13.

>     When I build dhcp, I did not find a /etc/default folder in my target directory, am I missing something there ?

You might have this question about 13/13 which requires a file in /etc/default,
but not here because of 06/13. But a default file provided by Buildroot would
not make sense for 13/13 since the file contents would be application-specific
though required. In this case, it is up to users to add a rootfs overlay with
such files.

>          [Install]
>          WantedBy=multi-user.target
>         --
>         2.1.4

Best regards,
Benoît



More information about the buildroot mailing list