Skip to content

Instantly share code, notes, and snippets.

@vincentbernat
Created October 25, 2014 16:33
Show Gist options
  • Save vincentbernat/78c11345ebd97607fed5 to your computer and use it in GitHub Desktop.
Save vincentbernat/78c11345ebd97607fed5 to your computer and use it in GitHub Desktop.
[Unit]
Description = dhclient on %I
Wants = network.target
Before = network.target
BindsTo = sys-subsystem-net-devices-%i.device
After = sys-subsystem-net-devices-%i.device
[Service]
Type = forking
PIDFile = /run/dhclient-%I.pid
ExecStart = /sbin/dhclient -v -pf /run/dhclient.%I.pid -lf /var/lib/dhcp/dhclient.%I.leases %I
[Install]
WantedBy = multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment