You can modify the actions executed by the switch by modifying the /etc/rc.button/switch script.