Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306897 - sys-apps/openrc-0.6.1-r1 does not support specifying dhclient arguments in /etc/conf.d/net
Summary: sys-apps/openrc-0.6.1-r1 does not support specifying dhclient arguments in /e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-26 03:36 UTC by Seth Robertson
Modified: 2010-04-02 03:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0.6.1-r1 patch (dhdiff,326 bytes, patch)
2010-03-29 15:57 UTC, Seth Robertson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seth Robertson 2010-02-26 03:36:16 UTC
dhclient traditionally (pre-openrc) and as currently documented in /usr/share/doc/openrc-0.6.0-r1/net.example claims to be able to supply arguments to dhclient.  An example of arguments someone might want to support include supplying the "-6" flag to get ipv6 dhcp-based statefull ip address assignment (yes, I am aware of stateless assignment and I don't want to), but really the exact reason is irrelevant.

However, in /lib64/rc/net/dhclient.sh, it does not attempt to read the \$dhclient_${IFVAR} variable (unlike, say, dhcpcd.sh).

Reproducible: Always

Steps to Reproduce:
1. echo 'dhclient_eth0="-6 -lf /var/lib/dhclient/dhclient6.leases"' >> /etc/conf.d/net
2. echo 'config_eth0="dhclient"' >> /etc/conf.d/net
3. /etc/init.d/net.eth0 -D restart


Actual Results:  
Attempts to get an ipv4 dhcp address because those argument were not present.

Expected Results:  
Attempts to get an ipv6 dhcp address because those arguments were present.


Contents of my /etc/conf.d/net file which should (and used to) give me both IPv6 and IPv4 DHCP
-------------------
dhclient_eth0="-6 -lf /var/lib/dhclient/dhclient6.leases"
config_eth0="dhcp dhclient"
dhcp_eth0="nodns"
-------------------

Patch to solve the problem:
-------------------
--- /lib64/rc/net/dhclient.sh~  2010-02-25 22:34:08.000000000 -0500
+++ /lib64/rc/net/dhclient.sh   2010-02-25 22:33:47.000000000 -0500
@@ -17,6 +17,7 @@
 
        # Get our options
        # These options only work in Gentoo, and maybe RedHat
+       eval args=\$dhclient_${IFVAR}
        eval opts=\$dhcp_${IFVAR}
        [ -z "${opts}" ] && opts=${dhcp}
 
-------------------

Oh, and BTW openrc also doesn't load the ipv6 module in time for this to work even if this bug were solved.  I had to manually autoload it.


Portage 2.2_rc63 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.11-r1, 2.6.32-gentoo-r7 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r7-x86_64-Intel-R-_Core-TM-2_Extreme_CPU_X9650_@_3.00GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 25 Feb 2010 00:15:01 +0000
app-shells/bash:     4.1_p2
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc:       3.4.6-r2, 4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -g -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind /var/yp/Makefile"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -g -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news notitles parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com/ ftp://chod.cwru.edu/gentoo ftp://mirrors.tds.net/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdr cli consolekit cracklib crypt css cups cvs cxx dbus dga dpms dri dts dvd dvdr eds emacs emboss encode evo fam ffmpeg firefox flac fortran gdbm gif gimp gnome gphoto2 gpm gstreamer gtk hal iconv imagemagick ipv6 joystick jpeg jpeg2k kde kqemu lame libnotify live logrotate lzo mad matroska mbox mikmod mjpeg mmx mng modules motif mp3 mp4 mpeg mplayer mudflap multilib nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses network nis nls nocd nptl nptlonly nvidia offensive ogg opengl openmp oss pam pcre pdf perl plotutils png postgres postscript ppds pppd prelude python qt3support qt4 quicktime readline reflection reiserfs scanner sendmail session sockets socks5 spell spl sse sse2 ssl startup-notification svg sysfs syslog theora threads thunar tiff truetype tta unicode usb vcd videos vnc vorbis wav wavpack x11vnc x264 xft xine xinerama xml xorg xosd xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Seth Robertson 2010-03-29 15:57:02 UTC
Created attachment 225669 [details, diff]
0.6.1-r1 patch

Since my system lost its IPv6 address, I checked and found that the upgrade from 0.6.0-r1 to openrc 0.6.1-r1 continued the problem.

Is dual stack dhcp really too much to ask for?
Comment 3 William Hubbs gentoo-dev 2010-04-02 03:28:40 UTC
This is fixed upstream.

Thanks,

William