From: Michael Tremer Date: Sun, 27 May 2012 12:18:22 +0000 (+0000) Subject: dhcp: Update the systemd unit file for dhclient. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43bdff8136ea385ae6e5423d2b4c5b3ea2afedde;p=ipfire-3.x.git dhcp: Update the systemd unit file for dhclient. This update enables dhclient to be properly used with the current networking code. --- diff --git a/dhcp/dhcp.nm b/dhcp/dhcp.nm index 246ad17a1..f9667b20f 100644 --- a/dhcp/dhcp.nm +++ b/dhcp/dhcp.nm @@ -5,7 +5,7 @@ name = dhcp version = 4.2.2 -release = 2 +release = 3 groups = Networking/Daemons url = http://isc.org/products/DHCP/ diff --git a/dhcp/systemd/dhclient4@.service b/dhcp/systemd/dhclient4@.service new file mode 100644 index 000000000..d7023c80e --- /dev/null +++ b/dhcp/systemd/dhclient4@.service @@ -0,0 +1,21 @@ +[Unit] +Description=DHCP client daemon for IPv4 on %I +BindTo=dev-%I.device +After=dev-%I.device + +[Service] +Restart=on-failure +ExecStartPre=/usr/lib/network/dhclient-helper start %I ipv4 +ExecStart=/usr/sbin/dhclient -d %I -4 \ + -cf /run/network/dhclient/%I/dhclient4.conf \ + -lf /var/lib/dhclient/dhclient-%I.leases \ + -pf /run/network/dhclient/%I/dhclient4.pid +ExecStop=/usr/lib/network/dhclient-helper stop %I ipv4 + +# This could be used if you want to release a lease. +#ExecStop=/usr/sbin/dhclient -d -r %I -4 \ +# -cf /run/network/dhclient/%I/dhclient4.conf \ +# -lf /var/lib/dhclient/dhclient-%I.leases \ +# -pf /run/network/dhclient/%I/dhclient4.pid + +UtmpIdentifier=%I diff --git a/dhcp/systemd/dhclient@.service b/dhcp/systemd/dhclient@.service deleted file mode 100644 index c3afc9392..000000000 --- a/dhcp/systemd/dhclient@.service +++ /dev/null @@ -1,17 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -[Unit] -Description=dhclient on %I -BindTo=dev-%I.device -After=dev-%I.device network.service -Requires=network.service - -[Service] -ExecStart=/usr/sbin/dhclient %I -UtmpIdentifier=%I -KillMode=process