First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 239098
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Philip Kovacs <kovacsp3@comcast.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
dhcpcd-skip-hook.diff Skip hooks correctly for compat options patch Roy Marples 2008-09-30 11:46 0000 998 bytes Details | Diff
dhcpcd-skip-hook.diff Skip hooks correctly. patch Roy Marples 2008-10-01 18:38 0000 1002 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 239098 depends on: Show dependency tree
Show dependency graph
Bug 239098 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-09-29 23:49 0000
I upgraded to dhcpcd-4.0.1-r1 last night from 3.2.3 and I notice that it
created an empty /etc//resolv.conf instead of my usual nameserver 192.168.0.101
entry.

Not sure if this is a configuration issue or a bug frankly.

I run net-dns/djbdns-1.05-r21 (dnscache) and dhcpcd 3.2.3 dis correctly create
the 'nameserver 192.168.0.101' entry in /etc/resolv.conf, but 4.0.1-r1 creates
no entries -- just the head/tail comment.

Here is my /etc/conf.d/net:

dns_domain=( "lan.net" )
dns_search=( "lan.net" )
config_eth0=( "dhcp" )
dhcp_eth0="nodns"
dns_servers_eth0=( "192.168.0.101" )

3.2.3 creates the following (correct) /etc/resolv.conf:

#Generated by net-scripts for interface eth0
domain lan.net
search lan.net
nameserver 192.168.0.101

but 4.0.1-r1 does not populate that file with any non-comment entries.

Help!



Reproducible: Always

------- Comment #1 From Jeroen Roovers 2008-09-29 23:59:33 0000 -------
*** Bug 239100 has been marked as a duplicate of this bug. ***

------- Comment #2 From Philip Kovacs 2008-09-30 00:18:59 0000 -------
same problem with or without the new compat USE flag

------- Comment #3 From Jeroen Roovers 2008-09-30 02:08:59 0000 -------
Please post your `emerge --info' too.

------- Comment #4 From Philip Kovacs 2008-09-30 02:16:06 0000 -------
#emerge --info

Portage 2.2_rc11 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.6.1-r0,
2.6.25-gentoo-r7 i686)
=================================================================
System uname:
Linux-2.6.25-gentoo-r7-i686-Intel-R-_Pentium-R-_4_CPU_2.40GHz-with-glibc2.0
Timestamp of tree: Tue, 30 Sep 2008 01:17:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks parallel-fetch preserve-libs protect-owned
sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
http://gentoo.mirrors.pair.com/ http://distfiles.gentoo.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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.namerica.gentoo.org/gentoo-portage"
USE="X aalib acl acpi alsa bluetooth branding bzip2 cairo cdr cli cracklib
crypt cups dbus dri dvd dvdr dvdread eds emboss encode evo fbcon firefox gif
gpm gstreamer gtk hal iconv imlib isdnlog jpeg kerberos libnotify mad midi
mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss
pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl
session slang spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff
truetype unicode usb v4l vorbis win32codecs x86 xcomposite xml xml2 xorg xv
xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci
emu10k1 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 en_US" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #5 From Roy Marples 2008-09-30 07:24:31 0000 -------
Please post details of how dhcpcd was started on your systems
ps ax | grep dhcpcd

------- Comment #6 From Paolo Pedroni 2008-09-30 10:25:23 0000 -------
I'm posting mine, since I have the same problem:

# ps ax | grep dhcpcd
12381 ?        Ss     0:00 dhcpcd -r 1.236.104.98 -N -M -R -m 2 eth0
14637 pts/0    R+     0:00 grep --colour=auto dhcpcd

My /etc/conf.d/net is as follows:

# cat /etc/conf.d/net
dns_domain_lo="casa"
nis_domain_lo="casa"
modules_eth0="dhcpcd"
dhcpcd_eth0="-r 1.236.104.98 -N -M -R"
dns_servers_eth0="208.67.222.222 208.67.220.220"

My generated /etc/resolv.conf is:
# cat /etc/resolv.conf

# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line

# emerge --info
Portage 2.1.4.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0,
2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor
4600+
Timestamp of tree: Tue, 30 Sep 2008 05:35:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild
/etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache collision-protect distcc distlocks fixpackages
metadata-transfer sandbox sfperms strict test unmerge-orphans userfetch
userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo
http://mirror.muntinternet.net/pub/gentoo/ ftp://mirror.ing.unibo.it/g entoo/
http://mirror.switch.ch/ftp/mirror/gentoo/ http://mirror.ing.unibo.it/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="it"
MAKEOPTS="-j14"
PKGDIR="/usr/portage/packages"
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://10.20.30.18/gentoo-portage"
USE="X Xaw3d a52 aac aalib acpi alsa amd64 ao arts audiofile avahi
bash-completion berkdb bluetooth branding bzip2 cairo caps cddb cdparanoia cdr
cli cracklib crypt cups curl dbus dga dio dri dvd dvdr dvdread emboss encode
exif expat fam fbcon ffmpeg fftw flac fontconfig foomaticdb fortran ftp gd gdbm
ggi gif glut gmp gnutls gphoto2 gpm gtk guile hal htmlhandbook iconv idn
ieee1394 imagemagick imlib isdnlog jack java javascript jbig jikes jpeg jpeg2k
kde kdeenablefinal kdeprefix lcms libcaca libnotify libsamplerate lm_sensors
lua lzo mad maildir matroska memlimit midi mime mmap mmx mng mozilla mp3 mpeg
mpi mplayer mudflap multilib ncurses nls nptl nptlonly nsplugin offensive ogg
openal openexr opengl openmp oss pam pch pcre pdf perl png portaudio posix ppds
pppd python qt3 qt3support qt4 quicktime rdesktop readline recode reflection
ruby samba scanner sdl session sharedmem shorten sndfile sockets sox speex
spell spl sse sse2 ssl startup-notification svg symlink sysfs syslog sysvipc
tcl tcpd theora threads tidy tiff timidity tk truetype unicode usb vcd
vim-syntax vorbis wmf wxwindows x264 xcb xcomposite xine xinerama xml xorg xosd
xpm xscreensaver xulrunner xv xvid yahoo zeroconf zlib" ALSA_CARDS="intel-8x0
virmidi" 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" CAMERAS="kodak ptp2" ELIBC="glibc" INPUT_DEVICES="evdev"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #7 From Roy Marples 2008-09-30 11:46:48 0000 -------
Created an attachment (id=166825) [edit]
Skip hooks correctly for compat options

This patch should fix things. Please test and report back!

------- Comment #8 From Paolo Pedroni 2008-09-30 12:25:03 0000 -------
(In reply to comment #7)
> Created an attachment (id=166825) [edit]
> Skip hooks correctly for compat options
> 
> This patch should fix things. Please test and report back!
> 

Nope, it does not work. :-(

------- Comment #9 From Philip Kovacs 2008-09-30 12:34:25 0000 -------
Paolo,

Did you test with USE=compat?  That patch would require compat.

Phil

------- Comment #10 From Philip Kovacs 2008-09-30 12:50:58 0000 -------
I also tried the patch here and can report that it does not help.

Still getting:

# cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line

Here is my command line as reported by ps:

# ps ax | grep dhcpcd
17994 ?        Ss     0:00 /sbin/dhcpcd -h porthos -R eth0

------- Comment #11 From Paolo Pedroni 2008-09-30 13:05:56 0000 -------
(In reply to comment #9)
> Paolo,
> 
> Did you test with USE=compat?  That patch would require compat.
> 
> Phil
> 

Of course I did.

------- Comment #12 From Roy Marples 2008-09-30 13:11:30 0000 -------
After applying the patch, you'll need to STOP dhcpcd, restore /etc/resolv.conf
and then restart dhcpcd. After that you should be fine.

------- Comment #13 From Philip Kovacs 2008-09-30 13:40:55 0000 -------
I need /etc/resolv.conf to be created from the Gentoo /etc/conf.d/net file.

With 3.2.3, you get exactly that behavior:

# rm /etc/resolv.conf
# /etc/init.d/net.eth0 restart
# cat /etc/resolv.conf
# Generated by net-scripts for interface eth0
domain lan.net
search lan.net
nameserver 192.168.0.101

Having 4.0.1-r1 not clobber an existing /etc/resolv.conf isn't enough.

------- Comment #14 From Paolo Pedroni 2008-09-30 14:49:51 0000 -------
(In reply to comment #12)
> After applying the patch, you'll need to STOP dhcpcd, restore /etc/resolv.conf
> and then restart dhcpcd. After that you should be fine.
> 

I think it doesn't work either, but I'm not sure, as I'm not home on the
concerned computer. More from me as soon as I get home.

------- Comment #15 From Roy Marples 2008-09-30 22:39:14 0000 -------
(In reply to comment #13)
> Having 4.0.1-r1 not clobber an existing /etc/resolv.conf isn't enough.

Eh? That's exactly what earlier versions of dhcpcd do with with -R flag - they
don't clobber /etc/resolv.conf and this patch enables that.

------- Comment #16 From Charlie Brackett 2008-09-30 23:56:26 0000 -------
Your patch fixes the problem for me.

My settings from dns_servers_eth2 now appear in /etc/resolv.conf instead of the
blank file generated from dhcpcd.

------- Comment #17 From Philip Kovacs 2008-10-01 01:02:19 0000 -------
I carefully reapplied the patch and rebooted this time.

# cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line

I don't run anything other than dhcpcd, no resolvconf, no dnsmasq, nothing
else.

The patch does not work for me.  If I mask off 4.0.1 and go back to 3.2.3,
everything is fine, i.e. _somthing_ creates my /etc/resolv.conf if its missing
and dhcpcd leaves it alone.

------- Comment #18 From Roy Marples 2008-10-01 05:18:53 0000 -------
(In reply to comment #17)
> I carefully reapplied the patch and rebooted this time.
> 
> # cat /etc/resolv.conf
> # Generated by dhcpcd
> # /etc/resolv.conf.head can replace this line
> # /etc/resolv.conf.tail can replace this line
> 
> I don't run anything other than dhcpcd, no resolvconf, no dnsmasq, nothing
> else.
> 
> The patch does not work for me.  If I mask off 4.0.1 and go back to 3.2.3,
> everything is fine, i.e. _somthing_ creates my /etc/resolv.conf if its missing
> and dhcpcd leaves it alone.

By don't you add a comment or restore /etc/resolv.conf to how it should be and
then restart net.eth0?
Then we will know if dhcpcd is still clobbering it for you OR baselayout isn't
correctly creating /etc/resolv.conf

------- Comment #19 From Philip Kovacs 2008-10-01 05:32:33 0000 -------
# cat /etc/resolv.conf
#
# This Comment added for testing purposes.
#
# Generated by net-scripts for interface eth0
domain lan.net
search lan.net
nameserver 192.168.0.101

# /etc/init.d/net.eth0 restart

 * Stopping dovecot ...                                                        
                  [ ok ]
 * Unmounting network filesystems ...                                          
                  [ ok ]
 * Stopping ntpd ...                                                           
                  [ ok ]
 * samba -> stop: smbd ...                                                     
                  [ ok ]
 * samba -> stop: nmbd ...                                                     
                  [ ok ]
 * Stopping sshd ...                                                           
                  [ ok ]
 * Stopping eth0
 *   Bringing down eth0
 *     Stopping dhcpcd on eth0 ...                                             
                  [ ok ]
 *     Shutting down eth0 ...                                                  
                  [ ok ]
 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...                                                    
                  [ ok ]
 *       eth0 received address 192.168.0.101/24
 * Starting dovecot ...                                                        
                  [ ok ]
 * Mounting network filesystems ...                                            
                  [ ok ]
 * Starting ntpd ...                                                           
                  [ ok ]
 * samba -> start: smbd ...                                                    
                  [ ok ]
 * samba -> start: nmbd ...                                                    
                  [ ok ]
 * Starting sshd ...                                                           
                  [ ok ]

# cat /etc/resolv.conf
# Generated by net-scripts for interface eth0
domain lan.net
search lan.net
nameserver 192.168.0.101

You can see that the eth0 restart causes the resolv.conf to be regenerated.
The comment I added is gone.

------- Comment #20 From Philip Kovacs 2008-10-01 05:34:52 0000 -------
My previous comment was for 3.2.3, i.e. the version that works.

------- Comment #21 From Paolo Pedroni 2008-10-01 17:42:25 0000 -------
(In reply to comment #12)
> After applying the patch, you'll need to STOP dhcpcd, restore /etc/resolv.conf
> and then restart dhcpcd. After that you should be fine.
> 

It does not work for me either.

------- Comment #22 From Roy Marples 2008-10-01 18:38:21 0000 -------
Created an attachment (id=166928) [edit]
Skip hooks correctly.

OK, this new patch works with config in comment #6.
Does this fix everyone?

------- Comment #23 From Philip Kovacs 2008-10-01 18:56:02 0000 -------
# cat /etc/resolv.conf
# Generated by net-scripts for interface eth0
domain lan.net
search lan.net
nameserver 192.168.0.101

# /etc/init.d/net.eth0 restart
 * Stopping dovecot ...                                                        
                  [ ok ]
 * Unmounting network filesystems ...                                          
                  [ ok ]
 * Stopping ntpd ...                                                           
                  [ ok ]
 * samba -> stop: smbd ...                                                     
                  [ ok ]
 * samba -> stop: nmbd ...                                                     
                  [ ok ]
 * Stopping sshd ...                                                           
                  [ ok ]
 * Stopping eth0
 *   Bringing down eth0
 *     Stopping dhcpcd on eth0 ...                                             
                  [ ok ]
 *     Shutting down eth0 ...                                                  
                  [ ok ]
 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
eth0: dhcpcd 4.0.1 starting
eth0: waiting for carrier
eth0: carrier acquired
eth0: broadcasting for a lease
eth0: offered 192.168.0.101 from 192.168.0.1
eth0: checking 192.168.0.101 is available on attached networks
eth0: acknowledged 192.168.0.101 from 192.168.0.1
eth0: leased 192.168.0.101 for 86400 seconds                                   
                  [ ok ]
 *       eth0 received address 192.168.0.101/24
 * Starting dovecot ...                                                        
                  [ ok ]
 * Mounting network filesystems ...                                            
                  [ ok ]
 * Starting ntpd ...                                                           
                  [ ok ]
 * samba -> start: smbd ...                                                    
                  [ ok ]
 * samba -> start: nmbd ...                                                    
                  [ ok ]
 * Starting sshd ...                                                           
                  [ ok ]

# cat /etc/resolv.conf
# Generated by net-scripts for interface eth0
domain lan.net
search lan.net
nameserver 192.168.0.101


Looks good now!

------- Comment #24 From Charlie Brackett 2008-10-01 18:57:56 0000 -------
The new patch works for me too.

------- Comment #25 From Robin Johnson 2008-10-01 20:56:30 0000 -------
4.0.2 is in the tree with the fix now, will fast-track to stable.

First Last Prev Next    No search results available      Search page      Enter new bug