1 1.1 thorpej #!/bin/sh - 2 1.1 thorpej # 3 1.3 mycroft # $NetBSD: reset_button,v 1.3 2003/11/01 23:04:54 mycroft Exp $ 4 1.1 thorpej # 5 1.1 thorpej # Generic script for reset button events. We simply attempt to 6 1.1 thorpej # reboot the system gracefully. 7 1.1 thorpej # 8 1.1 thorpej # Arguments passed by powerd(8): 9 1.1 thorpej # 10 1.1 thorpej # device event 11 1.1 thorpej 12 1.1 thorpej case "${2}" in 13 1.1 thorpej pressed) 14 1.3 mycroft /sbin/shutdown -r now "reset button pressed" 15 1.1 thorpej exit 0 16 1.1 thorpej ;; 17 1.1 thorpej 18 1.1 thorpej *) 19 1.2 mycroft logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1 20 1.1 thorpej exit 1 21 1.1 thorpej ;; 22 1.1 thorpej esac 23