FS#6523 - Dns search path and pre-up ifconfig in netcfg
Attached to Project:
Arch Linux
Opened by Joel Kaasinen (opqdonut) - Sunday, 04 March 2007, 12:04 GMT
Last edited by James Rayner (iphitus) - Sunday, 01 April 2007, 07:54 GMT
Opened by Joel Kaasinen (opqdonut) - Sunday, 04 March 2007, 12:04 GMT
Last edited by James Rayner (iphitus) - Sunday, 01 April 2007, 07:54 GMT
|
Details
The following patch adds two variables into net profiles:
SEARCH defines a dns search path and PRE_IFOPTS defines an
ifconfig command line to be run before bringing the
interface up. Useful for example for setting the mac.
|
This task depends upon
Closed by James Rayner (iphitus)
Sunday, 01 April 2007, 07:56 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in network scripts git
http://wiki.archlinux.org/index.php/Netw ork_Scripts
Sunday, 01 April 2007, 07:56 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in network scripts git
http://wiki.archlinux.org/index.php/Netw ork_Scripts
arch_netcfg_search_preopt.pat...
MAC="ff:ff:ff:ff:ff:ff"
or as I would use it:
MAC="`/usr/local/bin/genmac`"
This would change the MAC address before bringing the interface up (as this patch does) BUT it would be much better if the original MAC is saved somewhere and restored again when bringing the interface down again.
I use this behavior with public hotspots to be more anonymous and to prevent MAC tracking.
So the script would do something like this:
-- get the MAC from interface and save somewhere --
ifconfig $ETH down # it's important that the interface is down before changing MAC or it will fail
ifconfig $ETH hw ether $MAC
-- continue bringing the interface up --
and when bringing it down:
-- get the MAC from saved location --
ifconfig $ETH down
ifconfig $ETH hw ether $ORIGMAC