Skip to content

Instantly share code, notes, and snippets.

@kfl62
Created March 11, 2013 06:42
Show Gist options
  • Save kfl62/5132267 to your computer and use it in GitHub Desktop.
Save kfl62/5132267 to your computer and use it in GitHub Desktop.
ArchLinux network.service (dhclient) ipv4, ipv6
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-lan0.device
After=sys-subsystem-net-devices-lan0.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/dhclient lan0
ExecStart=/usr/sbin/dhclient -6 lan0
ExecStop=/usr/sbin/dhclient -6 -r lan0
ExecStop=/usr/sbin/dhclient -r lan0
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment