Hey all the syntax for macchanger's output is different now, I wrote a new file needs to get merged into netifrc in order to fix failed interface issues. If you try to use netifrc-0.1 with macchanger-1.6.0 you will get failure errors. Reproducible: Always
Created attachment 372542 [details] /lib/netifrc/macchanger.sh New version of macchanger.sh to fix parsing errors (sorry didn't make a patch)
Comment on attachment 372542 [details] /lib/netifrc/macchanger.sh --- ./net/macchanger.sh 2014-03-13 17:37:48.482111010 +0100 +++ - 2014-03-13 17:39:50.381092521 +0100 @@ -69,13 +69,13 @@ fi mac=$(/sbin/macchanger ${opts} "${IFACE}" \ - | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) + | sed -n -e 's/^New MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) _up # Sometimes the interface needs to be up .... if [ -z "${mac}" ]; then mac=$(/sbin/macchanger ${opts} "${IFACE}" \ - | sed -n -e 's/^Faked MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) + | sed -n -e 's/^New MAC:.*\<\(..:..:..:..:..:..\)\>.*/\U\1/p' ) fi if [ -z "${mac}" ]; then
bug exists, patch works, BUT it would break compatibility with older macchanger (if anyone cares). "macchanger -V | head -n1" will spit out the version, if we really care to support older versions.... personally, i think RDEPEND=!<macchanger-1.6 would be fine
Created attachment 373394 [details, diff] Support macchanger-1.6 without breaking 1.5 Modified patch to support both 1.5 and 1.6 at the same time. Zero_Chaos, could you test this, please?
Created attachment 373396 [details, diff] Support macchanger-1.6 without breaking 1.5 Fixed patch format (hopefully).
This notation doesn't appear to be valid: \(Faked|New\) Tested the patch, doesn't work.
(In reply to Rick Farina (Zero_Chaos) from comment #6) > This notation doesn't appear to be valid: > \(Faked|New\) > > Tested the patch, doesn't work. Been using this for a few months now, what version of macchanger are you using?
(In reply to Bombino from comment #7) > (In reply to Rick Farina (Zero_Chaos) from comment #6) > > This notation doesn't appear to be valid: > > \(Faked|New\) > > > > Tested the patch, doesn't work. > > Been using this for a few months now, what version of macchanger are you > using? Actually I've been using my origonal version... I still have NO idea why we would even want to support both version 1.5 and 1.6? Does anyone have any idea? why not use bump to 1.6? all default gentoo users already have this bump..
\(Faked\|New\) is the correct notation.
Created attachment 375024 [details, diff] correct patch patch to support 1.5 and 1.6 versions of macchanger
Mostly because I'm learning to git: http://git.overlays.gentoo.org/gitweb/?p=proj/netifrc.git;a=shortlog;h=refs/heads/bug504458 Please pull this tested change.
InVCS and released as 0.2.3. ryao: the code is fine. can you please read & try to follow the coding style next time re the comment formatting?
s/ryao/zero_chaos/ sorry.
(In reply to Robin Johnson from comment #13) > s/ryao/zero_chaos/ sorry. Owww, my pride....
Can we get this fixed in stable netifrc, please? Also, I've proposed a patch in bug 540728 which checks the exit status of macchanger as opposed to relying on the potentially volatile results of parsing the output.
net-misc/netifrc-0.1
*** Bug 510094 has been marked as a duplicate of this bug. ***