资 源 简 介
! /bin/sh
Change MAC-address of network interface cards to choose from.
echo "This script allows you to change MAC-address, without having to run again"
echo "All the available network interfaces:"
sudo ifconfig -a &&
echo -n "Enter the interface to change the MAC-address:"
read INT &&
echo
cd /etc/network/if-up.d
echo "#! /bin/sh" > pre-up &&
echo -n "Enter the desired MAC-address format aa: bb: cc: dd: ee: ff:"
read MAC &&
echo "sudo ifconfig $INT hw ether $MAC" >> pre-up &&
sudo chmod a+x /etc/network/if-up.d/pre-up
echo "The new MAC-address for network interface $INT : $MAC. reboot comp"
exit 0