init / kernel - change the script that gets called when pressing power button?
luckman212 last edited by luckman212
Right after I discovered how to disable the power button to prevent unexpected internet outages, my mind drifted to the idea of making that now-defunct button do something else instead. Maybe run a script that renews the WAN DHCP lease, or toggles a VPN connection, etc.
I saw in the docs for
init(8)some notes about the process itself, but it didn't seem possible to change it to call anything other than
/etc/rc.shutdown. Just came here to ask if any of you FreeBSD gurus know otherwise.