Code: Select all
#!/bin/sh
### BEGIN INIT INFO
# Provides: macchanger
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Changes the MAC address at boot time.
# Description: Changes the wireless cards MAC addresses
### END INIT INFO
# Change the MAC address
ifconfig wlan0 down
ifconfig wlan0 hw ether DC:44:6D:D3:A6:77
ifconfig wlan0 up
exit 0
I put the script in /etc/init.d and then
Code: Select all
chmod +x /etc/init.d/changemac.sh
Code: Select all
update-rc.d changemac.sh defaults
Code: Select all
ifconfig -a
What I doing wrong?
Thanks, John