You are not logged in.
The dhcpcd wiki page strongly suggest to use a named network interface (to prevent creating a race condition at boot with systemd-udevd).
So I made sure dhcpcd is not enabled:
# systemctl status dhcpcd
* dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
And enabled the dhcpcd template for the enp3s0 network interface, as you can see:
# systemctl status dhcpcd@enp3s0.service
* dhcpcd@enp3s0.service - dhcpcd on enp3s0
Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2018-07-28 22:25:15 CEST; 1 day 1h ago
Main PID: 564 (dhcpcd)
Tasks: 1 (limit: 4915)
Memory: 1.7M
CGroup: /system.slice/system-dhcpcd.slice/dhcpcd@enp3s0.service
`-564 /usr/bin/dhcpcd -q -w enp3s0
...
Next I do wish to apply the Dhcpcd Timeout delay suggestion because I don't want the console login to wait over 1 minute before being able to login.
The dhcpcd wiki page section is not detailed enough for me to understand how to do that. My first 2 attempts were:
# systemctl edit /etc/systemd/system/dhcpcd@.service.d/timeout.conf
No files found for etc-systemd-system-dhcpcd\x40.service.d-timeout.conf.mount.
Run 'systemctl edit --force etc-systemd-system-dhcpcd\x40.service.d-timeout.conf.mount' to create a new unit.
# systemctl edit /etc/systemd/system/dhcpcd@enp3s0.service.d/timeout.conf
No files found for etc-systemd-system-dhcpcd\x40enp3s0.service.d-timeout.conf.mount.
Run 'systemctl edit --force etc-systemd-system-dhcpcd\x40enp3s0.service.d-timeout.conf.mount' to create a new unit.
Note: there is no file/folder that starts with dhcpcd at [tt]/etc/systemd/system/[/tt]
Note #2: [tt]/etc/systemd/system/multi-user.target.wants/dhcpcd@enp3s0.service[/tt] does exist.
How (with which command) to setup the dhcpcd timeout.conf (as well as dhcpcdrestart.conf) for a named interface?
Is
systemctl edit --force /etc/systemd/system/dhcpcd@.service.d/timeout.conf
correct?
Last edited by probackup-nl (2018-08-24 09:56:37)
Offline
The command 'systemctl edit' waits a unit file name as parameter:
# systemctl edit dhcpcd@.service
It will create the '/etc/systemd/system/dhcpcd@.service.d' directory automatically, and open the text editor to write the drop-in file, then the systemd configuration is reloaded.
Offline
Thank you for your reply.
# systemctl edit dhcpcd@.service
Failed to get load state of dhcpcd@.service: Unit name dhcpcd@.service is neither a valid invocation ID nor unit name.
I still don't know which exact command to use to create the timeout.conf and restart conf.
Offline
Did you try the command with 'dhcpcd@enp3s0.service' ?
Offline
Did you try the command with 'dhcpcd@enp3s0.service' ?
Hi Berbae,
I hadn't tried
systemctl edit dhcpcd@enp3s0.service
When I do, that opens nano with an empty file, named /etc/systemd/system/dhcpcd@enp3s0.service.d/.#override.conf75d7651b5087e05a
I guess that I should have to paste these 3 lines in the editor and write it:
[Service]
ExecStart=
ExecStart=/usr/bin/dhcpcd -w -q -t 0 %I
I have no clue how to get the wiki suggested "/timeout.conf" or "/dhcpcdrestart.conf" or "/no-wait.conf" in this mix, do you?
Offline
You can just add the timeout.conf at that location and the no-wait is only relevant if you want to get rid of the -w flag because you notice your boot blocking.
Online
systemctl edit dhcpcd@enp3s0.service
When I do, that opens nano with an empty file, named /etc/systemd/system/dhcpcd@enp3s0.service.d/.#override.conf75d7651b5087e05a
I guess that I should have to paste these 3 lines in the editor and write it
You can save the file giving it the name you want in nano (I presume systemctl will use this name instead of the '.#override...'.
Then if you need it, run the command again to create another .conf file with other lines and another name.
Last edited by berbae (2018-08-14 15:28:42)
Offline
I am still struggling with creating systemd drop-in files for the dhcpcd@ template (not the named instance) following the instructions on Arch wiki.
I do want to override the template
dhcpcd@.serivce
I do not want to edit the named instance
dhcpcd@enp3s0.service
1. https://wiki.archlinux.org/index.php/Dh … own_issues suggests:
dhcpcd@.service is the name of the unit
2. To fix this, create a drop-in file for the unit
3. To create the drop-in file, wiki links to:
https://wiki.archlinux.org/index.php/Sy … p-in_files
That wiki page suggest to
systemctl edit unitname
Combine that:
systemctl edit dhcpcd@.service
Failed to get load state of dhcpcd@.service: Unit name dhcpcd@.service is neither a valid invocation ID nor unit name.
Offline
That wiki page suggest to
systemctl edit unitname
It says
To create drop-in files for the unit file /usr/lib/systemd/system/unit, create the directory /etc/systemd/system/unit.d/ and place .conf files there to override or add new options. systemd will parse and apply these files on top of the original unit.
After that it suggests the edit command as "The easiest way to do this". It is there as a convenience for quick/small changes. If it is not convenient for you -- because it apparently doesn't handle templates or because you want full control over the drop-in files and their names -- then don't use it.
If you had started to wonder whether drop-in files for templates are even possible or just need more information, check the systemd.unit(5) man page. The wiki is decent but it is always good to check instructions against the official docs.
Offline