Bug 476364 - initscripts ignore dhcpclass
Summary: initscripts ignore dhcpclass
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 10
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-12-13 16:56 UTC by Vadym Chepkov
Modified: 2008-12-17 04:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-12-17 04:11:18 UTC
Type: ---

Attachments (Terms of Use)

Description Vadym Chepkov 2008-12-13 16:56:30 UTC
During kickstart installation you can specify dhcpclass=intserver in the anaconda command line and in kickstart file as well.

Anaconda honors the request and gets IP from the configured pool and it populates interface configuration file with two options:

# grep -i dhcp /etc/sysconfig/network-scripts/ifcfg-eth0


Only DHCP_HOSTNAME is propagated into /etc/dhclient-eth0.conf:

cat /etc/dhclient-eth0.conf
send host-name "pavilion";  # temporary RHL ifup addition

It should also add

send user-class "intserver";

or, what anaconda uses,

send vendor-class-identifier "intserver";

Comment 1 Bill Nottingham 2008-12-16 15:08:23 UTC
Dave, when was this added to anaconda?

Comment 2 David Cantrell 2008-12-16 19:44:21 UTC
24-Oct-2008, commit 8807d1cfc446bd23404e150e31eb0cf7fe4c98e1

I now write out dhclient-DEVICE.conf in anaconda since we're using NetworkManager now.  It will pick up that file and combine it with its own internal settings for the device (which is picked up from ifcfg-DEVICE).  ifcfg-fedora in NetworkManager doesn't read every possible value that could exist in ifcfg-DEVICE, which is why I put 'send vendor-class' in dhclient-DEVICE.conf during installation.

Hope that explains it.

Comment 3 Bill Nottingham 2008-12-16 20:00:29 UTC
Given that anaconda writes out dhclient-DEVICE.conf, I'm not sure anything needs changed in initscripts. Am I missing something?

Comment 4 Vadym Chepkov 2008-12-16 21:23:14 UTC
I assume anaconda does it during installation process, but installed system doesn't have 'send vendor-class-identifier' in dhclient-DEVICE.conf

Comment 5 Bill Nottingham 2008-12-16 21:37:35 UTC
Does anaconda need to copy it to the installed system?

Comment 6 David Cantrell 2008-12-16 21:50:32 UTC
(In reply to comment #5)
> Does anaconda need to copy it to the installed system?

Probably.  It's not doing that now.  Reassigning bug to me.

Comment 7 Vadym Chepkov 2008-12-17 03:04:24 UTC
But if the settings in ifcfg-DEVICE are changed, anaconda won't be there to update dhclient-DEVICE.conf. I still think ifup-eth should do it, the same way it does it for DHCP_HOSTNAME, the changes are really trivial:

if [ -n "${DHCP_CLASSID}" ]; then
       # Send a vendor-class-identifier to the DHCP server
       if [ -w /etc/dhclient-${DEVICE}.conf ] ; then
           if ! LC_ALL=C grep "send *vendor-class-identifier *\"${DHCP_CLASSID}\"" /etc/dhclient-${DEVICE}.conf > /dev/null 2>&1 ; then
               echo "send vendor-class-identifier \"${DHCP_CLASSID}\";  # temporary RHL ifup addition" >> /etc/dhclient-${DEVICE}.conf
       elif ! [ -e /etc/dhclient-${DEVICE}.conf ] ; then
           echo "send vendor-class-identifier \"${DHCP_CLASSID}\";  # temporary RHL ifup addition" >> /etc/dhclient-${DEVICE}.conf

Comment 8 David Cantrell 2008-12-17 04:11:18 UTC
This fix will be included in anaconda- in rawhide.

Note You need to log in before you can comment on or make changes to this bug.