Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 228663 - sys-apps/netplug-1.2.9-r3: Gentoo-specific netplug script doesn't exit when it should on probe
Summary: sys-apps/netplug-1.2.9-r3: Gentoo-specific netplug script doesn't exit when i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mounir Lamouri (volkmar) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-21 03:01 UTC by Ole Christian Tvedt
Modified: 2010-02-28 18:53 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 Ole Christian Tvedt 2008-06-21 03:01:16 UTC
When netplugd calls /etc/netplug.d/netplug (which is gentoo-specific) with the "probe" argument, the comments in the script suggests nothing should be done. Even so, it calls /etc/init.d/net.ethX without arguments (when initng is not in use), causing usage to be printed to stdout.

This is not seen in normal operation, as netplugd is not started by the user. When initng is used, /sbin/ngc is started without arguments instead. I don't use initng, but if this is also wrong (as I suspect it is) the fix is really simple:

+++ /etc/netplug.d/netplug	2008-06-21 04:36:41.000000000 +0200
@@ -39,6 +39,7 @@
 	;;
     probe)
 	# Do nothing as we should already be up
+	exit 0
 	;;
     *)
 	echo "$0: wrong arguments" >&2

I'm leaving this at normal severity, as I don't know how severe it is for initng.

Reproducible: Always

Steps to Reproduce:
1. Run netplugd manually as root with default settings, not using initng.
2.
3.

Actual Results:  
/etc/netplug.d/netplug eth0 probe -> pid 26429
Usage: net.lo [ flags ] < options >

Normal Options:
    start stop restart pause zap
      Default init.d options.

Flags:
    --quiet
      Suppress output to stdout, except if:
      1) It is a warning, then output to stdout
      2) It is an error, then output to stderr
    --verbose   Output extra information
    --debug     Output debug information
    --nocolor   Suppress the use of colors

Configuration files:
    /etc/conf.d/net.lo    /etc/rc.conf

For more info, please run '/etc/init.d/net.eth0 help'.

[...repeated for each existing /etc/init.d/net.ethX, then correct output up to eth15...]

Expected Results:  
/etc/netplug.d/netplug eth0 probe -> pid 24772
[...repeated for eth1-15...]

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4-pepper x86_64)
=================================================================
System uname: 2.6.24-gentoo-r4-pepper x86_64 Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
Timestamp of tree: Tue, 10 Jun 2008 22:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=nocona -march=nocona -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mtune=nocona -march=nocona -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.gentoo.no/ http://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/"
LANG="nn_NO.UTF-8"
LC_ALL="nn_NO.UTF-8"
LINGUAS="nn nb nn_NO nb_NO en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth bzip2 cairo cdda cddb cdr cli cracklib crypt cups dbus dga divx dri dts dv dvb dvd dvdr dvdread eds emacs emboss encode evo expat fam fat ffmpeg firefox flac fontconfig foomaticdb fortran ftp fuse gdbm gdl gecko gif gimp gimpprint glitz gmedia gnome gnutls gpg gpgme gpm gsm gstreamer gtk gzip hal hddtemp iceweasel iconv idn imagemagick imap imlib ipv6 isdnlog iso14755 java javascript joystick jpeg kerberos kqemu kvm ladspa ldap levels libcaca libnotify live lzo mad matroska md5sum mdnsresponder-compat midi mikmod mmap mmx mono mozdevelop mp2 mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap mysql nano-syntax ncurses net nls nntp nptl nptlonly nsplugin ntfs offensive ogg openal opengl openmp pam pcre pdf perl png pop pppd python qemu quicktime rar readline realmedia reflection reiser4 reiserfs rplay rss samba sasl sdl session slang smime smtp sounds speedo speex spell spl sse sse2 ssl ssse3 stroke svg tcpd tga theora threads threadsafe tiff tk truetype type1 unicode usb v4l v4l2 vcd vorbis wavpack wifi wma wmp x264 xml xorg xscreensaver xv xvid xvmc zip zlib" 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 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse joystick synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nn nb nn_NO nb_NO en_GB" USERLAND="GNU" VIDEO_CARDS="fglrx radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mounir Lamouri (volkmar) (RETIRED) gentoo-dev 2010-02-28 18:53:29 UTC
This is fixed in 1.2.9-r5 and 1.2.9.1.