FS#17885 - [dhclient] personal dhclient.conf

Attached to Project: Arch Linux
Opened by Gergely (imrehg) - Monday, 18 January 2010, 02:58 GMT
Last edited by Isenmann Daniel (ise) - Saturday, 30 January 2010, 10:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Isenmann Daniel (ise)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
Been trying to upgrade the dhclient package, but it fails, complaining that /etc/dhclient.conf already exists in the system. Checking it out in the package, it ideed has someone's personal dhclient.conf in it, causing the upgrade to break.

Additional info:
* dhclient 4.1.0.p1-2

Steps to reproduce:
Try to upgrade from 3.1.2p1-3 -> 4.1.0.p1-2
This task depends upon

Closed by  Isenmann Daniel (ise)
Saturday, 30 January 2010, 10:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with pkgversion -3
Comment by Jay Tanzman (jt512) - Tuesday, 19 January 2010, 04:10 GMT
I confirm this bug.
Comment by Michal (broch) - Wednesday, 20 January 2010, 16:59 GMT
I don't have this problem, however dhclient was moved from /sbin/dhclient to /usr/sbin/dhclient. would be nice to see some sort of warning than network script requires modification
Comment by Isenmann Daniel (ise) - Wednesday, 20 January 2010, 17:39 GMT
Can you tell me which network script requires modification? One of our official supported script or your personal?
Comment by Michal (broch) - Thursday, 21 January 2010, 13:53 GMT
/etc/rc.d/network has hardcoded dhcpcd client, so I had to modify network script to invoke dhclient instead. Unfortunately dhclient does not provide (or at least I can't find it) own network script replacement.
dhclient 3.x had script located in /sbin/
dhclient 4.x has script moved to /usr/sbin
I had to correct network script accordingly. This is not a big deal, would be nice though to get small warning.

In general if system files are moved it would be nice to get some sort of warning. Users are compiling their own software and knowing that that system file was moved could help troubleshoot user potential problems with custom compiled/modified software.
Comment by Maximilien Cuony (the_glu) - Thursday, 21 January 2010, 15:17 GMT
I have it too, what the hell this file is doing here ?
Comment by Jakub Schmidtke (sjakub) - Friday, 22 January 2010, 19:56 GMT
Actually the /etc/dhclient.conf should have only this line instead of all that personal stuff:
script "/etc/dhclient-script"

To fix http://bugs.archlinux.org/task/17904

Or maybe there is a better fix - there seems to be some packaging issue, since dhclient by default looks for its own script file in the wrong place :/



Comment by ianux (ianux) - Sunday, 24 January 2010, 13:31 GMT
Also, moved path affect autowifi script which rely on dhclient
Comment by Pete (tam1138) - Tuesday, 26 January 2010, 02:52 GMT
It's not a personal /etc/dhclient.conf, it's the example file shipped by ISC, and should most certainly *not* be installed as /etc/dhclient.conf on Arch systems. It's my opinion that, unless the Arch devs wish to start hacking their own dhclient scripts (ew):

- Jakub's advice should be followed (i.e., the /etc/dhclient.conf file should ship with only the line `` script "/etc/dhclient-script ''); and
- the file currently shipped as /etc/dhclient.conf should instead be shipped as /etc/dhclient.conf.example.

It is also my opinion that Michal should open a separate bug for his issue, which I believe is quite different.
Comment by Jakub Schmidtke (sjakub) - Tuesday, 26 January 2010, 04:42 GMT
Peter: Shouldn't the program by default look for its script in the location this script is actually located?
If the "vanilla" version of the program expects /sbin/dhclient-script, shouldn't this script be put there?
Or the program patched to look for the script inside /etc/ ?
Comment by Isenmann Daniel (ise) - Tuesday, 26 January 2010, 06:32 GMT
Ok guys, to clarify this topic and the other bug report about wrong path (http://bugs.archlinux.org/task/17904). I will do the following to fix both bugs:

1. Install the dhclient.conf file as dhclient.conf.example
2. Move dhclient-script back to /sbin/ where it is located as defined in the sourcecode

Comment by Pete (tam1138) - Tuesday, 26 January 2010, 17:10 GMT
Ah yes, Jakub, you are correct! I hadn't realized that /sbin/dhclient-script was the default as compiled into the binary. Sorry for the confusion there. I agree that the script should be moved rather than the source patched.

Daniel: I did some experimenting and it appears that, in the absence of an /etc/dhclient.conf file, dhclient will behave as if it had been given the file you intend to ship as /etc/dhclient.conf.example. Please verify this before committing to a solution, as my experiments may have been flawed (eg, I may have failed to nuke the cached leases, or any number of other oversights on my part).

Loading...