]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
dhcp: Update the systemd unit file for dhclient.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 May 2012 12:18:22 +0000 (12:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 May 2012 13:26:17 +0000 (15:26 +0200)
This update enables dhclient to be properly used
with the current networking code.

dhcp/dhcp.nm
dhcp/systemd/dhclient4@.service [new file with mode: 0644]
dhcp/systemd/dhclient@.service [deleted file]

index 246ad17a1ec53f3fe028e8da4591de7729a4455a..f9667b20f9c8460ecdf79ad18519ba341c3d968a 100644 (file)
@@ -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 (file)
index 0000000..d7023c8
--- /dev/null
@@ -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 (file)
index c3afc93..0000000
+++ /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