Difference between revisions of "Talk:Dhcpd"

From ArchWiki
Jump to: navigation, search
(Created page with "The part about editing this file to have dhcpd listen on a particular interface appears outdated: /etc/conf.d/dhcp I was able to get it to listen on a specific interface by ...")
 
Line 8: Line 8:
  
 
This works, but I am not sure that this is the best place to make the edit.  Can anyone suggest a better place, or confirm this is the best place?
 
This works, but I am not sure that this is the best place to make the edit.  Can anyone suggest a better place, or confirm this is the best place?
 +
 +
 +
--------------------
 +
 +
 +
:I created the file /etc/systemd/system/dhcpd4@.service, which did not exist in  /usr/lib/systemd/system/
 +
 +
:{{ic|# nano /etc/systemd/system/dhcpd4\@.service}}
 +
{{bc|1=[Unit]
 +
Description=IPv4 DHCP server on %I
 +
Wants=network.target
 +
After=network.target
 +
 +
[Service]
 +
Type=forking
 +
PIDFile=/run/dhcpd4.pid
 +
ExecStart=/usr/sbin/dhcpd -4 -q -pf /run/dhcpd4.pid %I
 +
KillSignal=SIGINT
 +
 +
[Install]
 +
WantedBy=multi-user.target
 +
}}
 +
 +
:And enabled with:
 +
:{{ic|# systemctl enable dhcpd4@eno1.service}}
 +
: which seems to work, although I am not sure it is the correct way either.
 +
:[[User:WayneS|WayneS]] ([[User talk:WayneS|talk]]) 18:48, 4 August 2013 (UTC)

Revision as of 18:48, 4 August 2013

The part about editing this file to have dhcpd listen on a particular interface appears outdated:

/etc/conf.d/dhcp

I was able to get it to listen on a specific interface by editing this file:

/etc/systemd/system/multi-user.target.wants/dhcpd4.service

This works, but I am not sure that this is the best place to make the edit. Can anyone suggest a better place, or confirm this is the best place?




I created the file /etc/systemd/system/dhcpd4@.service, which did not exist in /usr/lib/systemd/system/
# nano /etc/systemd/system/dhcpd4\@.service
[Unit]
Description=IPv4 DHCP server on %I
Wants=network.target
After=network.target

[Service]
Type=forking
PIDFile=/run/dhcpd4.pid
ExecStart=/usr/sbin/dhcpd -4 -q -pf /run/dhcpd4.pid %I
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target
And enabled with:
# systemctl enable dhcpd4@eno1.service
which seems to work, although I am not sure it is the correct way either.
WayneS (talk) 18:48, 4 August 2013 (UTC)