[oe-commits] Khem Raj : dhcp: Add systemd unit file for dhclient

Samuel Stirtzel s.stirtzel at googlemail.com
Fri Jan 11 10:45:47 UTC 2013


2013/1/9  <git at git.openembedded.org>:
> Module: meta-openembedded.git
> Branch: master
> Commit: 6f86cfec550105c60097b91434ab1ae54614265f
> URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=6f86cfec550105c60097b91434ab1ae54614265f
>
> Author: Khem Raj <raj.khem at gmail.com>
> Date:   Mon Oct 29 17:26:45 2012 -0700
>
> dhcp: Add systemd unit file for dhclient
>
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
>
> ---
>
>  .../dhcp/dhcp/dhclient.service                     |   13 +++++++++++++
>  .../dhcp/dhcp_4.2.4-P2.bbappend                    |    7 +++++--
>  2 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service b/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service
> new file mode 100644
> index 0000000..76d64d5
> --- /dev/null
> +++ b/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service
> @@ -0,0 +1,13 @@
> +[Unit]
> +Description=Dynamic Host Configuration Protocol (DHCP)
> +After=syslog.target network.target
> +
> +[Service]
> +Type=forking
> +PIDFile=/var/run/dhclient.pid
> +EnvironmentFile=-/etc/default/dhcp-client
> +ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases
> +
> +[Install]
> +WantedBy=multi-user.target
> +
> diff --git a/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend b/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend
> index a18fda8..fde2426 100644
> --- a/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend
> +++ b/meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend
> @@ -5,9 +5,12 @@ inherit systemd
>
>  PRINC := "${@int(PRINC) + 1}"
>
> -SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd"
> +SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd dhcp-client-systemd"
>  SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
>  SYSTEMD_SERVICE_dhcp-relay-systemd = "dhcrelay.service"
> +SYSTEMD_SERVICE_dhcp-client-systemd = "dhclient.service"
>
>  SRC_URI += "file://dhcpd.service \
> -            file://dhcrelay.service"
> +            file://dhclient.service \
> +            file://dhcrelay.service \
> +           "
>

Hi,

this seems to miss a pid file:

Dynamic Host Configuration Protocol (DHCP)...
systemd[1]: PID file /var/run/dhclient.pid not readable (yet?) after start.
[FAILED] Failed to start Dynamic Host Configuration Protocol (DHCP).
See 'systemctl status dhclient.service' for details.


Any idea why it is missing?


--
Regards
Samuel




More information about the Openembedded-commits mailing list