Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 415357 - net-dns/dnsmasq init script should not depend on net
Summary: net-dns/dnsmasq init script should not depend on net
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-10 11:45 UTC by JMW
Modified: 2012-05-10 23:43 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JMW 2012-05-10 11:45:00 UTC
Today while I was trying to get dnsmasq working I found that my /etc/init.d/net.wlan0 began to erroneously report itself as "inactive" even when it was working fine, thus preventing dnsmasq from starting up. To get around this, I add the line "rc_dnsmasq_need=!net". dnsmasq now starts up and works fine, though net.wlan0 still reports "inactive" erroneously. Since dnsmasq evidently will work fine even if started before net, and since the dependency clearly can cause problems when net.* reports its status incorrectly, this dependency should be removed, as it does not serve any particular function and can clearly cause problems. Instead, it might be a better idea to specify that dnsmasq should start after net, but start up regardless of whether net starts. If the network is not working, dnsmasq will sit idly and not cause any problems, whereas not having dns or having to rely on the unreliable dns server given out by their router will almost certainly be regarded as a problem for most users of dnsmasq.

Reproducible: Always

Steps to Reproduce:
1.Arrange for net.* to incorrectly report its/their status.
2.Try to start dnsmasq
3.Fail
Actual Results:  
dnsmasq refused to start, resulting in hours of trying to figure out how to get it working.

Expected Results:  
dnsmasq should have started fine, as it doesn't really need net anyway.

emerge --info
Portage 2.1.10.49 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r3, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.0.3
Timestamp of tree: Sun, 06 May 2012 19:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2, 2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.6-r1, 4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo cj-overlay dustin flow bitcoin sunrise my_local_overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb"
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.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="af ar as_IN be be_BY bg bn br brx bs ca cs cy da de dgo dz el en en_GB en_US en_ZA eo es et eu fa fi fo fr ga gl gu he hi hi_IN hr hu id is it ja ka kk km kn_IN ko kok ks ku la lt mai mk ml_IN mn mni mr_IN nb ne nl nn no nr ns oc or_IN pa_IN pl pt pt_BR ro ru rw sa_IN sat sd sh sk sl sr ss st sv sw_TZ ta ta_IN te_IN tg th ti_ER tn ts tr uk ur_IN uz ve vi xh zh_CN zh_TW zu"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/cj-overlay /var/lib/layman/dustin /var/lib/layman/flow /var/lib/layman/bitcoin /var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="256-color 3dnowext 64bit X a52 aac aacs aalib acl acpi addns adns aio airplay alisp alsa amd64 apng aspell assistant asyncns atmo authdaemond autotrace avahi bash-completion berkdb bidi binfilter blas blink bluetooth bluray bogofilter boo buffer-on-clear bugzilla bzip2 cairo caps catalogs cblas-external ccache cdda cddb cdr cdt cec cjk classic cli cluster collab common-lisp compat consolekit contrast corefonts cracklib crypt css ctypes-python cups curl cxx daap dbus dc1394 declarative development dia dillo dirac directfb djvu dlz doc double-precision dri dts dv dvb dvd dvi eap-sim editor eds egl emf equalizer examples exif expat extras faac fading-colors fam fasteap fbcon ffmpeg fftw fits flac fluidsynth fontconfig fontforge fortran fping fpx freemail freetds frei0r games gbm gcj gd gdbm geoip ggi gif gimp gles gme gmplayer gnutls goom gost gpg gphoto2 gpm grammar graphite graphviz grp gs gsm gssapi gstreamer gtkstyle hdri hfs hog hotpixels hpcups hpijs httpd hvm i18n iconv icu id3tag idn ieee1394 imagemagick inkjar ipod ipv6 irda iso14755 jadetex java javacomm jbig joystick jpeg jpeg2k karma kate kerberos ladspa lame lapack latex lcms ldb lensfun libass libcaca libffi libgda liblockfile libnl libnotify libproxy libsamplerate libtiger libv4l live lqr lua lzma lzo madwifi maps math matroska mdb mdnsresponder-compat midi mikmod mjpeg mmx mmxext mng modplug modules mono moonlight mp3 mpeg mpi mplayer mtp mudflap multilib multimedia musepack music mvl mysql mythtv ncurses network nls nntp nodrm nokia nptl nsplugin ntlm_unsupported_patch nuv objc objc++ objc-gc ocr odbc odbcmanual odk ogg old-daemons openal opencl openct openexr opengl openldap openmp openntpd openvg openvz openxml optimization optimized-qmake ots pam pasteafter pch pcre pcsc-lite pda pdf perl-geoipupdate pgo phonon physfs plotutils plugins png policykit postgres postproc pppd private-headers profile profile4 projectm pth pulseaudio pvr python q16 q32 qpak qt3support qt4 quicktime quota raw readline realtime remoteosd resolvconf romio rtmp rtsp samba sample sasl scanner schroedinger script sdb-ldap sdl sdl-image secondary-wheel secure-delete session shine shout skins slang smartcard smbsharemodes smime smp sndfile snmp soundex soundtouch spamassassin speex spell sqlite sqlite3 srp sse sse2 sse3 ssh ssl startup-notification stream strong-optimization subtitles svg swat syslog system-sqlite systemtap t1lib taglib tcpd templates textures theora thesaurus thin-splines threads tiff timezone timidity tokyocabinet tools tordns truetype twolame udev unicode unicode3 unlock-notify upnp usb utils v4l v4l2 vaapi vamp vcd vcdx vdpau video vim-syntax vlm vorbis vpopmail vpx vserver vst wad wavpack wcwidth webdav-serf webkit webkit2 webp wifi wma-fixed wmf wordperfect wps x264 xbase xcb xcomposite xface xft xine xml xmlpatterns xnest xorg xosd xterm-color xv xvfb xvid youtube zemberek zeroconf zippy zlib zsh-completion zvbi" 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 denoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="af ar as_IN be be_BY bg bn br brx bs ca cs cy da de dgo dz el en en_GB en_US en_ZA eo es et eu fa fi fo fr ga gl gu he hi hi_IN hr hu id is it ja ka kk km kn_IN ko kok ks ku la lt mai mk ml_IN mn mni mr_IN nb ne nl nn no nr ns oc or_IN pa_IN pl pt pt_BR ro ru rw sa_IN sat sd sh sk sl sr ss st sv sw_TZ ta ta_IN te_IN tg th ti_ER tn ts tr uk ur_IN uz ve vi xh zh_CN zh_TW zu" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Patrick McLean gentoo-dev 2012-05-10 23:07:47 UTC
There should be at lease some network device on the system before starting dnsmasq (even net.lo), the dependency on net is a valid one.

Probably what you want is rc_depend_strict="NO" in /etc/rc.conf

Here is the description:

# Do we allow any started service in the runlevel to satisfy the dependency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES"
Comment 2 JMW 2012-05-10 23:43:54 UTC
I have net.lo started at bootup and I have rc_depend_strict="NO", but still dnsmasq would not start until I removed its dependency on net in rc.conf. I would agree with you in principle if net.lo was able to satisfy it, but it clearly did not, I don't know why.