Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470186 - net-misc/netifrc and sys-apps/openrc: named fails to start waiting for net.eno1, even if I start net.ppp2 for 'net'
Summary: net-misc/netifrc and sys-apps/openrc: named fails to start waiting for net.en...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-17 16:07 UTC by Robert Forsman
Modified: 2016-10-24 22:20 UTC (History)
1 user (show)

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 Robert Forsman 2013-05-17 16:07:25 UTC
My laptop sees use in a couple of environments. When I'm home I can plug it into wired ethernet, but most other places I plug in a cellular data USB stick.  I've rigged the necessary rules in /etc/udev/rules.d to start /etc/init.d/net.ppp2 when it is plugged in.

A couple of months ago it was working fine, but then I upgraded a lot of packages and since then the services which "need net" are not starting up correctly.  They try to start when I turn on the laptop but output some message about how they're waiting for eno1 (the wired ethernet).

Despite the fact that the net.ppp2 provides the "net" functionality and I have rc_depend_strict="NO" in my /etc/rc.conf, starting net.ppp2 does not allow the remainder of my net-dependent services to start automatically.  They'll only start if I plug in the ethernet cable (which activates eno1).

What setting am I missing to enable the services to start when "net" is provided by net.ppp2 instead of net.eno1?


Reproducible: Always
Comment 1 Robert Forsman 2013-05-17 16:17:16 UTC
I'm currently working around the problem by doing

tgt=${1:-default}

for dn_ in /etc/runlevels/"$tgt"/*; do
    dn=`basename $dn_`
    [ -e /var/lib/init.d/started/$dn ] || /etc/init.d/$dn start
done


I'm pretty sure the directory is not /var/lib/init.d any more, but I have not dug far enough to figure out where it moved, and trying to start the service twice is harmless.


Linux dakhla 3.0.6-gentoo #3 SMP Fri Apr 26 14:15:35 EDT 2013 i686 Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz GenuineIntel GNU/Linux

dakhla thoth # emerge --info
Portage 2.1.11.62 (default/linux/x86/13.0, gcc-4.6.3, glibc-2.15-r3, 3.0.6-gentoo i686)
=================================================================
System uname: Linux-3.0.6-gentoo-i686-Intel-R-_Core-TM-_i3_CPU_M_380_@_2.53GHz-with-gentoo-2.2
KiB Mem:     3104916 total,     95320 free
KiB Swap:    2104476 total,   2104360 free
Timestamp of tree: Wed, 15 May 2013 09:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.4.6, 2.6.6-r2, 2.7.3-r3, 3.1.4-r3, 3.2.3-r2, 3.3.0-r1
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.5, 4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo sunrise kde-sunset x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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/sunrise /usr/local/portage/layman/kde-sunset /home/thoth/portage"
SYNC="rsync://alexandria/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac acl alsa amr apache2 apng arts bash-completion berkdb bluetooth bzip2 bzlib cli cracklib crypt css cxx dbus dga divx4linux dri dts dv dvd dvdr edl encode faac ffmpeg firefox flac g3dvl gdbm gif gnome gnutls gpm gtk hal iconv imagemagick inkjar ipv6 java jpeg jpeg2k live logrotate lzo mad maildir matroska mjpegi mmx mmxext mng modules mozsvg mp3 mp4 mpeg mpeg2 mudflap musepak mysql mythtv ncurses nls nojython nptl nsplugin ogg openal opengl openmp oss pam pcmcia pcre pdf png pnm quicktime readline rtsp samba session span speex sse sse2 ssl svg tcltk tcpd theora tiff transcode truetype udev unicode upnp v4l vim-with-x vorbis wma wmf x264 x86 xanim xinerama xml xv xvid xvmc yv12 zlib" ABI_X86="32" 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="authn_core authz_core socache_shmcb unixd 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 author" 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 keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-05-12 15:34:36 UTC
i'm not exactly sure what the problem here is, but the bug is somewhere in net-misc/netifrc or sys-apps/openrc, so reassigning to correct maintainers:

$ qfile -b -v net.lo
net-misc/netifrc-0.2.3 (/etc/init.d/net.lo)
$ qfile -b -v net.sh
net-misc/netifrc-0.2.3 (/lib/udev/net.sh)
$ qfile -b -v 90-network.rules
net-misc/netifrc-0.2.3 (/lib/udev/rules.d/90-network.rules)
$ qfile -b -v rc.conf
sys-apps/openrc-0.12.4 (/etc/rc.conf)

90-network.rules triggers net.sh and net.sh purposely skips ppp* but is likely the cause of eno* triggering, I suppose you could try...

$ ln -s /dev/null /etc/udev/rules.d/90-network.rules

...to disable the hotplugging altogether?
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-10-24 22:20:26 UTC
You're starting net.ppp2 manually from the perspective of openrc, and this factors into the dependency checks.

Rather than your loop I would suggest you use: 'openrc --no-stop', and it will start all other services that are presently eligible to start.

Of the services you have with 'need net', what do they actually need? If you only have local connectivity, can they run? sshd for example if it's listening on 0.0.0.0, does NOT have 'need net'.
putting rc_need="!net" in their /etc/conf.d/$svcname files can help you as well.

Beyond that, if this is still a problem, please reopen the bug.