As we can read in /etc/rc.conf: # rc_hotplug is a list of services that we allow to be hotplugged. # By default we do not allow hotplugging. Which is a lie, because it is on, I had to add rc_hotplug="!net.*" to stop it. Reproducible: Always
(In reply to comment #0) > As we can read in /etc/rc.conf: > # rc_hotplug is a list of services that we allow to be hotplugged. > # By default we do not allow hotplugging. > Which is a lie, because it is on, I had to add rc_hotplug="!net.*" to stop it. There is no emerge --info posted in this bug so I can't determin which version of openrc you are running, but I can say that it works for me; Iran the following test here: 1) remove net.eth0 from default runlevel 2) reboot. Since I do not have rc_hotplug defined in my rc.conf, my network did not come up. I next defined rc_hotplug="net.*" and rebooted, then my network came up as it should. I also verified that the net.eth0 service showed as starting in the hotplug runlevel in rc-status. Please make sure that you are running the latest openrc (openrc-0.7.0 as of this writing) and re-open this bug if the issue still exists.
Sorry, I forgot about emerge --info as I think it is pretty much useless, but I should at least provide qlist -Ive openrc, anyway emerge --info: frontier ~ # emerge --info Portage 2.2.0_alpha27 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.38 x86_64) ================================================================= System uname: Linux-2.6.38-x86_64-Intel-R-_Core-TM-_i5_CPU_M_480_@_2.67GHz-with-gentoo-2.0.1 Timestamp of tree: Fri, 18 Mar 2011 09:00:01 +0000 ccache version 3.1.4 [enabled] app-shells/bash: 4.2_p8 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.6-r2, 2.7.1-r1, 3.1.3-r1 dev-util/ccache: 3.1.4 dev-util/cmake: 2.8.4 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.7.0 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 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) Repositories: gentoo kde-sunset mozilla multimedia lcd-filtering foo-overlay Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2 -mtune=generic" 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 /usr/share/gnupg/qualified.txt" 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/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=core2 -mtune=generic" DISTDIR="/var/portage/distfiles" FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en pl" MAKEOPTS="--quiet -j4" PKGDIR="/var/portage/packages" PORTAGE_COMPRESS="bzip2" PORTAGE_COMPRESS_FLAGS="-9" 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/portage/tmp" PORTDIR="/var/portage/tree" PORTDIR_OVERLAY="/var/lib/layman/kde-sunset /var/lib/layman/mozilla /var/lib/layman/multimedia /var/lib/layman/lcd-filtering /home/slashbeast/src/foo-overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa amd64 berkdb bzip2 cli cracklib crypt cups cxx dbus dri fontconfig fortran gdbm gpm iconv ipv6 jpeg lcdfilter logrotate mmx modules mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre perl png pppd python readline session sse sse2 sse3 ssl ssse3 sysfs tcpd threads tiff truetype unicode vim-syntax vorbis x264 xft xorg xvid zlib zsh-completion" 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 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" 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="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau 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, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS I don't think that removing net.lo is a solution, because something have to start local interface. More about use case: I used my netbook to share connection with my laptop, netbook have dnsmasq as dnsforwarder and dhcp server. I will try reproduce it tomorrow as I will get the hardware together. I will change status for now to UNCONFIRMED until I will test it again.
(In reply to comment #2) > I don't think that removing net.lo is a solution, because something have to > start local interface. No, I didn't say I removed net.lo, I removed net.eth0. :) I have net.eth0 set up with a static address. I just removed net.eth0 from my default runlevel then rebooted and it didn't start, which it shouldn't have, because hotplugging is off by default. Then, while net.eth0 was still not in any runlevels, I added this line to rc.conf: rc_hotplug="net.*" When I rebooted again, with that setup, net.eth0 was started. I next ran rc-status and saw that net.eth0 was started in the hotplug runlevel, which means it was hotplugged. So, I don't know why you are thinking that hotplug is on by default. If it fails again, I need to see the output from rc-status and the rc.conf file that makes it fail.
Created attachment 266439 [details] rc.conf file.
frontier ~ # rc-update fsck | boot modules | boot savecache | shutdown bootmisc | boot killprocs | shutdown vixie-cron | default wicd | default sysctl | boot consolefont | boot netmount | default keymaps | boot procfs | boot urandom | boot dmesg | sysinit hwclock | boot net.lo | boot hostname | boot localmount | boot dmsetup-mknodes | sysinit dellfand | default mount-ro | shutdown mtab | boot local | default nonetwork metalog | boot swap | boot devfs | sysinit termencoding | boot udev-postmount | default udev | sysinit root | boot This is regular ~amd64 gentoo with glibc and gcc forced from stable keyword. I removed !net.* from rc.conf (In fact, I removed rc.conf and re-emerged openrc to restore default one) and after reboot just after local interface I saw message for net.eth0: No config specified, running dhcp. Just wonder, do you have dhcpcd binary on your system?
And, for the record, eth0 is empty port, No cable attached at this time.
The rc.conf file looks good. The output from rc-update shows that the only net.* script in your runlevels is net.lo. I also need to see the output from rc-status. That will show which services are active and the runlevel they were started in.
(In reply to comment #7) > The rc.conf file looks good. > The output from rc-update shows that the only net.* script in your runlevels is > net.lo. > I also need to see the output from rc-status. That will show which services are > active and the runlevel they were started in. You most likely have another service that requires net, this would in fact cause a hotplug of net.eth0 etc. As William has stated please include the full output of rc-status. Hotpluggin is also working as expected on this ~amd64 multilib hardned setup.
# rc-status Runlevel: default vixie-cron [ started ] dnsmasq [ started ] wicd [ started ] netmount [ started ] mysql [ started ] dellfand [ started ] udev-postmount [ started ] local [ started ] Dynamic Runlevel: hotplugged net.eth0 [ stopped ] Dynamic Runlevel: needed udev-mount [ started ] dbus [ started ] Dynamic Runlevel: manual (In reply to comment #8) > You most likely have another service that requires net, this would in fact > cause a hotplug of net.eth0 etc. As William has stated please include the full > output of rc-status. Hotpluggin is also working as expected on this ~amd64 > multilib hardned setup. Well no, Hotplugged != needed, as you can see above, as dep (for example need dbus) I have started dbus. Hotplug looks to be only for NIC and such things, from rc.conf: "A hotplugged service is one started by a dynamic dev manager when a matching hardware device is found." I will try reproduce it in pure gentoo virtual machine and write steps to reproduce it.
I was able reproduce it on new system. On fresh system (stage3) I just installed dhcpcd. IF /etc/init.d/net.eth0 exist, then it will be hotpluged, unless I add !net.eth0 or anything what will cover it (!net.*). Steps to reproduce: - Install clean gentoo system. - Update to ~arch - install dhcpcd - link net.lo to net.eth0 - Reboot.
Any progress? This bug is quite annoying.
Created attachment 277051 [details] output.txt Here is output from my box when I set up your situation. I'm not sure how to get rid of the ansi escape sequences, so you will need to view it with less or something similar. This shows that net.eth0 is not in a runlevel but it is linked to net.lo in /etc/init.d. Also, you can see my rc.conf, rc-status output and /etc/conf.d/net. I included rc.log as well so that you can see that net.eth0 does not start. I am running openrc from git and unable to reproduce your situation.
I have to install gentoo vm anyway so I will do it again. I will provide full bash_history whatever I did to reproduce it, hope it will help. Give me few days.
pretty sure i'm seeing hotplugging on my laptop system because when i load my wireless module, net.wlan0 gets auto-started on me ...
Piotr, do you still have /etc/conf.d/rc on your system? If so, wipe it out and let me know if this is still an issue. William
I don't have this file on any of my current installs and there is no hotplugging happen, but when I put a /etc/conf.d/rc from the one of my really old backups the hotplug was kicked in. You were right, the present of /etc/conf.d/rc is to blame.
I am closing this bug because of comment #16. Please feel free to re-open if there is still an issue.