I tested with a Buffalo WHR-G54S using VicTec RAF1.28.121006, Built on Mon, 06 Dec 2010 16:10:42 +0100.
Your script did not work for my testing. I changed some things and made it work.
For the button 2-4 seconds run custom script ;
nvram set wl0_radio=1 && service net restart
For the button 4-6 seconds run custom script ;
nvram set wl0_radio=0 && service net restart
I put a blank line between the two command lines and it worked fine. If I hold the button for 2 - 4 seconds the wireless turns ON.
If I hold the button for 4-6 seconds the wireless turn OFF.
Reboot the router and the wireless stays OFF or ON, however you selected with the button.
I upgraded to Shibby K24 V108 ND VPN. The buttons do not work like they did with Vic-Tec firmware. I telnet into the Shibby firmware.
I enter nvram set wl0_radio=1 && service net restart and the radio will turn ON.
I enter nvram set wl0_radio=0 && service net restart but the radio will NOT turn off.