Skip to contentSkip to conversation

Khem Raj : dhcp: Add systemd unit file for dhclient

oe-commits Samuel Stirtzel 3 participants 5 messages Jan 11, 2013 – Feb 21, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20130109101310.38A4C103A7@opal

#1 lore raw

2013/1/9 <[email protected]>:

Quoted 47 lines
Module: meta-openembedded.git
Branch: master
Commit: 6f86cfec550105c60097b91434ab1ae54614265f
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=6f86cfec550105c60097b91434ab1ae54614265f
Author: Khem Raj <[email protected]>
Date:   Mon Oct 29 17:26:45 2012 -0700

dhcp: Add systemd unit file for dhclient

---

 .../dhcp/dhcp/dhclient.service                     |   13 +++++++++++++
 .../dhcp/dhcp_4.2.4-P2.bbappend                    |    7 +++++--
 2 files changed, 18 insertions(+), 2 deletions(-)
meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service new file +13 -0
new file mode 100644
index 0000000..76d64d5
@@ -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
+
meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend +0 -1
index a18fda8..fde2426 100644
@@ -5,9 +5,12 @@ inherit systemd
 
 PRINC := "${@int(PRINC) + 1}"
 
-SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd"

meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend inherit systemd · line 16

Quoted 10 lines
meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend +5 -1
+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

#2 lore raw

Samuel Stirtzel <s.stirtzel-gM/[email protected]>

Quoted 8 lines · writes:
Quoted 1 line

+ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases

...
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?

probably a '--no-pid' option

Enrico

#3 lore raw
Quoted 10 lines · Enrico Scholz

Samuel Stirtzel <s.stirtzel-gM/[email protected]>

Quoted 7 lines · writes:
Quoted 1 line

+ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases

...
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.

Quoted 3 lines
Quoted 1 line

Any idea why it is missing?

probably a '--no-pid' option

how is /var/run setup in your case ? may be its not existing for some reason

#4 lore raw

2013/2/20 Khem Raj <[email protected]>:

Quoted 11 lines · Enrico Scholz
Quoted 10 lines

Samuel Stirtzel <s.stirtzel-gM/[email protected]>

Quoted 7 lines · writes:
Quoted 1 line

+ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases

...
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.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Any idea why it is missing?

probably a '--no-pid' option

how is /var/run setup in your case ? may be its not existing for some reason

Hi,

/var/run exists, there is just no PID file for dhclient. The service however explicitly states that it wants one "PIDFile=/var/run/dhclient.pid".

--
Regards
Samuel

#5 lore raw
Quoted 20 lines · Samuel Stirtzel

2013/2/20 Khem Raj <[email protected]>:

Quoted 11 lines · Enrico Scholz
Quoted 10 lines

Samuel Stirtzel <s.stirtzel-gM/[email protected]>

Quoted 7 lines · writes:
Quoted 1 line

+ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases

...
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.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Any idea why it is missing?

probably a '--no-pid' option

how is /var/run setup in your case ? may be its not existing for some reason

Quoted 6 lines

Hi,

/var/run exists, there is just no PID file for dhclient. The service however explicitly states that it wants one "PIDFile=/var/run/dhclient.pid".

In my case pid file exists and I dont get this error so wondering what could be different in your case.

Quoted 9 lines

--
Regards
Samuel

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel