Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92802 - Error in /lib/rcscripts/net.modules.d/macchanger script. $opts variable contains 'start stop restart' causing macchanger to fail.
Summary: Error in /lib/rcscripts/net.modules.d/macchanger script. $opts variable conta...
Status: RESOLVED DUPLICATE of bug 71929
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66472
  Show dependency tree
 
Reported: 2005-05-16 09:15 UTC by Tim Hutt
Modified: 2005-07-17 13:06 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 Tim Hutt 2005-05-16 09:15:07 UTC
Hi,

I was getting the non-helpful message "Failed to change MAC address" from ./net.eth0 start and eventually found the cause.

For some reason, in /lib/rcscripts/net.modules.d/macchanger, the $opts variable starts off containing the string 'start stop restart' to which the other options are added.

This means the command "/sbin/macchanger start stop restart --mac=<mac>" is executed and obviously fails.

Adding opts="" to the start of the function makes it work (not sure if this is the correct fix.

Reproducible: Always
Steps to Reproduce:
1. Add mac_eth0="<mac>" to /etc/conf.d/net
2. Run /etc/init.d/net.eth0 start
3.

Actual Results:  
Error message: Failed to change MAC address. 

Expected Results:  
Bleh
Comment 1 Roy Marples (RETIRED) gentoo-dev 2005-05-16 11:31:23 UTC
What version of baselayout are you using?

You neglected to provide the output of "emerge --info"
Comment 2 Tim Hutt 2005-05-16 12:16:02 UTC
Eep sorry. Didn't see anywhere telling me to do that...

Here it is:

Portage 2.0.51.20-r5 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-r7 i686)
=================================================================
System uname: 2.6.10-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.8
dev-lang/python:     2.3.4
sys-apps/sandbox:    1.2.3
sys-devel/autoconf:  2.59-r4
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.2-r5
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/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/terminfo /etc/env.d"
CXXFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acl acpi adns aim alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bzlib cdparanoia cdr crypt cups curl doc dvd emboss encode esd ethereal exif f77 fam fastcgi fbcon flac foomaticdb fortran ftp gdbm gif gnutls gphoto2 gpmgstreamer gtk gtk2 icq imagemagick imap imlib innodb ipv6 jabber java jpeg kde lcms ldap libg++ libwww lirc mad map mikmod mime mmx mng motif mp3 mpeg msn mysql mysqli ncurses nls nocd offensive ogg oggvorbis openal opengl oss pam pdflib perl pic pie png posix postgres python qt quicktime readline samba scanner sdl slang sockets speex spell sqlite sse ssl svga tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb vorbis xine xml2 xmms xpm xv xvid zlib"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Using baselayout 1.11.8
Comment 3 Roy Marples (RETIRED) gentoo-dev 2005-05-17 05:18:39 UTC

*** This bug has been marked as a duplicate of 71929 ***