Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vidul-nikolaev-petrov/dc61fe3a131d66ffca8f to your computer and use it in GitHub Desktop.
Save vidul-nikolaev-petrov/dc61fe3a131d66ffca8f to your computer and use it in GitHub Desktop.
#!/bin/bash
nvram set wan_hwaddr=`nvram get def_hwaddr`
ifconfig `nvram get wan_ifname` down
ifconfig `nvram get wan_ifname` hw ether `nvram get def_hwaddr`
ifconfig `nvram get wan_ifname` up
kill -USR2 $(pidof udhcpc) 2> /dev/null
killall udhcpc 2> /dev/null
/usr/sbin/udhcpc -i `nvram get wan_ifname` -p /var/run/udhcpc/pid -s /tmp/udhcpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment