Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547020 - net-misc/netifrc-0.2.2: add ability to run macchanger
Summary: net-misc/netifrc-0.2.2: add ability to run macchanger
Status: RESOLVED DUPLICATE of bug 547906
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: netifrc Team
URL:
Whiteboard: netifrc:macchanger
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-18 18:09 UTC by Toralf Förster
Modified: 2016-10-24 23:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix net-misc/netifrc-0.2.2 (/lib/netifrc/net/macchanger.sh) for macchanger-1.7.0 (macchanger.sh,2.20 KB, text/plain)
2015-10-29 11:52 UTC, noc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-04-18 18:09:25 UTC
There're old bug (eg bug #71929) but those don't seems to cover my issue.

I tried to run macchanger in the preup() section of /etc/conf.d/net of my WLAN interface - but this never worked reliable. And using an own written udev rule also don't work reliable.

What works is however to add few lines to /etc/init.d/net.lo:

  # by toralf
  #
  if [[ "$IFACE" = "wlp3s0" ]]; then
    /usr/bin/macchanger -A $IFACE
  fi

  # We up the iface twice if we have a preup to ensure it's up if
  # available in preup and afterwards incase the user inadvertently
  # brings it down

/me wonders how to achieve the same with /etc/conf.d/net ?

BTW there's a typo : "incase" -> "in case"

back ground:
https://forums.gentoo.org/viewtopic-t-1014838-highlight-.html  
https://forums.gentoo.org/viewtopic-t-1015264-highlight-macchanger.html
Comment 1 Toralf Förster gentoo-dev 2015-04-20 13:10:56 UTC
FWIW as advised in the forum I tried to add sleeps in /etc/conf.d/net, no success:

#  WLAN
#
config_wlp3s0="dhcp"

preup(){
  if [[ "$IFACE" = "wlp3s0" ]]; then
    #ifconfig $IFACE down
    #sleep 1
    #macchanger -A $IFACE
    #ifconfig $IFACE up
    #sleep 5
    :
  fi
}
Comment 2 noc 2015-10-29 11:52:28 UTC
Created attachment 415696 [details]
Fix net-misc/netifrc-0.2.2 (/lib/netifrc/net/macchanger.sh) for macchanger-1.7.0

net-misc/netifrc-0.2.2 (/lib/netifrc/net/macchanger.sh)

macchanger -V
GNU MAC changer 1.7.0

macchanger -a enp4s1

Current MAC:   e8:cc:32:4a:53:d2 (Micronet  LTD)
Permanent MAC: 00:11:22:33:44:55 (Apple)
New MAC:       50:ce:75:81:87:10 (Measy Electronics Ltd)

Output of new macchanger changed, so we must change /lib/netifrc/net/macchanger.sh accordingly.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-10-24 23:16:04 UTC

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