FS#33685 - [dhcpcd] Unit file needs to be updated for 'systemctl enable'

Attached to Project: Arch Linux
Opened by Mantas Mikulėnas (grawity) - Sunday, 03 February 2013, 11:37 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 09 February 2013, 16:57 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Ronald van Haren (pressh)
Dave Reisner (falconindy)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In its early versions, systemd could not enable unit instances, so our dhcpcd@.service had to say:

[Install]
Alias=multi-user.target.wants/dhcpcd@eth0.service

However, since version 188 [29283ea4c] (that's 9 versions ago) systemd *can* enable and disable unit instances. So the above Alias line should be replaced with:

[Install]
WantedBy=multi-user.target

This has become much more important when persistent interface names were introduced, since regardless of what interface the user tries to enable dhcpcd on, the Alias causes a symlink for the NONEXISTENT eth0 interface to be added – meaning that the user has to go and create symlinks manually. Using WantedBy would fix this.
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 09 February 2013, 16:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  core/dhcpcd-5.6.4-2
Comment by Kevin (anonymous_user) - Sunday, 03 February 2013, 14:25 GMT
See this previous bug report:

https://bugs.archlinux.org/task/31093
Comment by Thomas Bächler (brain0) - Wednesday, 06 February 2013, 09:30 GMT
This really makes no sense anymore. Whenever you enable anything with dhcpcd@.service, it will enable dhcpcd for eth0. With recent versions of systemd, you will not even have anything named eth0 anymore by default. In fact, there is no sane "default interface" - if you "just want network", you can enable dhcpcd.service.

I see no valid reason why the Alias=* is not replaced with WantedBy=multi-user.target.
Comment by Dave Reisner (falconindy) - Friday, 08 February 2013, 18:12 GMT
5.6.4-2 is in [testing] with this change.

Loading...