I'm using baselayout-1.12.0_pre8-r2. Usually the /etc/init.d/net.* script calls the user-defined functions preup(), postup(), predown() and postdown() if defined in /etc/conf.d/net. However, if you use modules=("wpa_supplicant"), the postup() function will be never called for an interface that came up. This is because /lib/rcscripts/net.modules.d/wpa_supplicant uses exit in line 335, which doesn't give net.lo a chance to call postup() after the interface is up. PS: I didn't verify that, but there seems to be a similar problem in the netplug module (line 100 exits with success) Reproducible: Always Steps to Reproduce: 1. Use a wpa enabled wireless network configuration: modules=("wpa_supplicant") 2. add a postup() function to /etc/conf.d/net: postup() { echo "WHEEE" } 3. (re)start the wireless network device /etc/init.d/net.xxx (re)start Actual Results: Starting a wired interface will print "WHEEE" (which is the intended bahavior), but starting a wireless interface with wpa_supplicant won't print it, because postup() isn't called Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r9 i686) ================================================================= System uname: 2.6.12-gentoo-r9 i686 Intel(R) Pentium(R) III Mobile CPU 1133MHz Gentoo Base System version 1.12.0_pre8 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distcc distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.stud.fh-dortmund.de/mirror/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LINGUAS="de en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/bmg-main /usr/local/overlays/gentoo-de" SYNC="rsync://rsync.stud.fh-dortmund.de/gentoo-portage" USE="x86 X aalib acl acpi alsa apm avi bash-completion berkdb bitmap-fonts cdparanoia crypt cups curl dvd eds emboss encode fam flac foomaticdb fortran gd gdbm gif gpm gtk gtk2 imap imlib ipv6 java jpeg junit kde ldap libg++ libwww mad matroska mikmod mmx motif mozilla mp3 mpeg mysql ncurses network nls nptl nptlonly ogg oggvorbis opengl pam pcmcia pdflib perl pic png pnp python qt quicktime readline samba sdl slang smime snmp socks5 speex spell sse ssl svga tcltk tcpd tetex threads tiff truetype truetype-fonts trusted type1-fonts unicode usb vorbis xine xml2 xv xvid zlib linguas_de linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS
Uuum, I'm probably wrong. postup() is working, but doesn't show any stdout output. After redirecting output of preup() and postup() to a file, I discovered that postup() is actually called. I dunno how and why (postup() can't print on stdout and is running from another pid than preup()), but it looks like this bug can be resolved INVALID. Sorry.
postup() will never show output with wpa_supplicant as the inital run launches wpa_supplicant which in turn re-runs net.* when association is made. This happens in the background, hence it's never shown on screen. This also happens when you use netplug