If I restart ethernet interface or bridge interface I get an error message from HSR and dummy plugins about unknown is_interface_type command: # /etc/init.d/net.eth0 restart net.eth0 | * Bringing down interface eth0 net.eth0 |/lib/netifrc/net/hsr.sh: line 12: is_interface_type: command not found net.eth0 |/lib/netifrc/net/dummy.sh: line 12: is_interface_type: command not found net.eth0 | * Removing port eth0 from br0 ... [ ok ]h0 | net.eth0 |RTNETLINK answers: No such file or directory net.eth0 |Error talking to the kernel net.eth0 | * Running postdown ... net.eth0 | * Bringing up interface eth0 net.eth0 | * Running preup ... [ ok ]h0 | Relevant part of /etc/conf.d/net: bridge_br0="eth0" config_br0="dhcp" dhcp_br0="nontp" dhcpcd_br0="-t 8" config_eth0="null" I have net-misc/netifrc-0.5.1.
I hit the same issue when restarting pptpd with many ppp interfaces connected. is_interface_type is defined in net.lo, but it seems that neither dummy.sh nor hsr.sh from netifrc includes it... It's weird
I can't reproduce this. Config: RC_NEED_br0="net.dummy0 net.dummy7" bridge_br0='dummy0 dummy7' config_br0='195.6.2.2/24' config_dummy0='null' config_dummy7='null' depend_br0() { need net.dummy0 net.dummy7 } # /etc/init.d/net.br0 start net.br0 | * Bringing up interface br0 net.br0 | * Running preup ... net.br0 | * Creating bridge br0 ... net.br0 | * Adding ports to br0 net.br0 | * dummy0 ... [ ok ] net.br0 | * dummy7 ... [ ok ] net.br0 | * 195.6.2.2/24 ... [ ok ] net.br0 | * Waiting for IPv6 addresses ... [ ok ] net.br0 | * Running postup ... # /etc/init.d/net.br0 restart net.br0 | * Bringing down interface br0 net.br0 | * Destroying bridge br0 ... [ ok ] net.br0 | * Bringing up interface br0 net.br0 | * Running preup ... net.br0 | * Creating bridge br0 ... net.br0 | * Adding ports to br0 net.br0 | * dummy0 ... [ ok ] net.br0 | * dummy7 ... [ ok ] net.br0 | * 195.6.2.2/24 ... [ ok ] net.br0 | * Waiting for IPv6 addresses ... [ ok ] net.br0 | * Running postup ...
Thanks for the attempt. When setting up your configuration, I discovered /etc/init.d/net.* files are not symlinks to net.lo anymore. Their modification time matched a day after I upgraded sys-apps/openrc to 0.21 (maybe a reboot). I checked my another machine exhibiting the error message and I found the same state with similar emerge log. It looks like update to ~sys-apps/openrc-0.21 (or subsequent etc-update run) replaced the symlinks with a copy, so the new plugins could not find the function definitions in the stalled init scripts for my ethernet devices. After restoring them to symlinks to net.lo, the error message disappeared.
pinkbyte: Can you confirm the symlink issue on your system too?
*** Bug 607798 has been marked as a duplicate of this bug. ***
To answer the question from here: https://bugs.gentoo.org/show_bug.cgi?id=607798 Yes, all net.* except net.lo are symlinks to net.lo.
(In reply to Gleb from comment #6) > To answer the question from here: > https://bugs.gentoo.org/show_bug.cgi?id=607798 > > Yes, all net.* except net.lo are symlinks to net.lo. Hmm, can you please try the testcase from comment #2?
oas1 ~ # head -9 /etc/conf.d/net RC_NEED_br0="net.dummy0 net.dummy7" bridge_br0='dummy0 dummy7' config_br0='null' config_dummy0='null' config_dummy7='null' depend_br0() { need net.dummy0 net.dummy7 } oas1 ~ # /etc/init.d/net.br0 start * Bringing up interface br0 * Creating bridge br0 ... * Adding ports to br0 * dummy0... [ ok ] * dummy7... [ ok ] * Waiting for IPv6 addresses (5 seconds) .. [ ok ] oas1 ~ # /etc/init.d/net.br0 stop * Bringing down interface br0 /lib/netifrc/net/hsr.sh: line 12: is_interface_type: command not found /lib/netifrc/net/dummy.sh: line 12: is_interface_type: command not found * Destroying bridge br0 ... [ ok ] oas1 ~ # ls -la /etc/init.d/net.* lrwxrwxrwx 1 root root 6 Feb 2 08:07 /etc/init.d/net.br0 -> net.lo lrwxrwxrwx 1 root root 6 Feb 2 07:49 /etc/init.d/net.dummy0 -> net.lo lrwxrwxrwx 1 root root 6 Feb 2 07:49 /etc/init.d/net.dummy7 -> net.lo lrwxrwxrwx 1 root root 6 Feb 2 08:06 /etc/init.d/net.lan0 -> net.lo lrwxrwxrwx 1 root root 6 Feb 2 08:06 /etc/init.d/net.lan1 -rwxr-xr-x 1 root root 18514 Jan 25 10:08 /etc/init.d/net.lo My emerge --info: Portage 2.3.3 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.23-r3, 4.4.39-gentoo-UNDYNE x86_64) ================================================================= System uname: Linux-4.4.39-gentoo-UNDYNE-x86_64-Intel-R-_Pentium-R-_CPU_G2130_@_3.20GHz-with-gentoo-2.3 KiB Mem: 4014520 total, 204800 free KiB Swap: 8388596 total, 8339976 free Timestamp of repository gentoo: Wed, 01 Feb 2017 21:15:01 +0000 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 distcc 3.2rc1 x86_64-pc-linux-gnu [enabled] app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.22.3_rc4::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.6.3::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.22.4::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.dstu.local/gentoo-portage priority: -1000 steam-overlay location: /var/lib/layman/steam masters: gentoo priority: 0 rion location: /var/lib/layman/rion masters: gentoo priority: 1 pinkbyte location: /var/lib/layman/pinkbyte masters: gentoo priority: 100 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2 -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=core2 -msse3" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles" LANG="ru_RU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j11 -l2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X aac acl acpi alsa amd64 bash-completion bzip2 cli consolekit cracklib crypt cxx dbus dri dvd enca exif fbcon flac fontconfig fortran gif gpm iconv idn ipv6 jpeg kde lzma mmxext modules mp3 multilib ncurses nls nptl ogg opengl openmp pam pcre png policykit qt3support qt4 readline samba seccomp session sndfile sse sse2 ssl ssse3 svg tcpd theora threads tiff truetype unicode usb vorbis wavpack xattr xcb xcomposite xinerama xv zlib" ABI_X86="64" 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" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="ru ru_RU" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru ru_RU" NETBEANS_MODULES="apisupport java" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 mipsel x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="vesa 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: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Hm, it seems that net.lan1 in my installation was broken - it's old copy of net.lo file from previous netifrc(not sure why this happened). After removing and replacing with proper symlink on net.lo, everything works like a charm. I never copied net.lo file, always creating symlinks as handbook said(cause i kinda understand consequences) So, the problem is, why some of the links turned into files? For example, on one of my server it looks like this: admin@ares ~ $ ls -la /etc/init.d/net.* -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.ifb0 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.ifb1 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.lan0 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.lan1 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.lan2 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.lan3 -rwxr-xr-x 1 root root 18514 янв 4 16:49 /etc/init.d/net.lo -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun0 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun1 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun2 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun3 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun4 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun5 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun6 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun7 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tun8 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.tunv6 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.vlan1 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifi1 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifi2 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifi7 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifi8 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifi9 -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifim -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifinew -rwxr-xr-x 1 root root 17416 окт 2 16:37 /etc/init.d/net.wifip ALL of the net interfaces turned into regular files, containg net.lo from PREVIOUS version of netifrc! But on the other server(where neither tunnels, nor vlans are set up) - upgrade went fine
Please note, that ANY interface file, containing old net.lo instead of new one MAY trigger this error, even if the interface that we will restart is correctly linked with right net.lo Not sure why
So this is fun: This is installed from binpkgs, net.lo is an older state, using the binpkg to reinstall netifrc doesn't want to update it. Thus it's eternally stuck on a version old enough to miss the *_interface_type functions ...
Ok, so this is not a netifrc issue, but rather a portage bug.
(In reply to Patrick Lauer from comment #11) > So this is fun: > This is installed from binpkgs, net.lo is an older state, using the binpkg > to reinstall netifrc doesn't want to update it. That's an intentional portage feature called "config memory" that prevents you from having to merge the same config files more than once. It can be disabled using emerge --noconfmem. In any case, the originally reported bug has nothing to do with this. I would guess the symlinks were replaced with regular files due to some broken pkg_postinst code, or possibly some user error. If you are able to get portage to reproduce this, please let us know how.