11.1Sthorpej#!/bin/sh - 21.1Sthorpej# 31.3Smycroft# $NetBSD: reset_button,v 1.3 2003/11/01 23:04:54 mycroft Exp $ 41.1Sthorpej# 51.1Sthorpej# Generic script for reset button events. We simply attempt to 61.1Sthorpej# reboot the system gracefully. 71.1Sthorpej# 81.1Sthorpej# Arguments passed by powerd(8): 91.1Sthorpej# 101.1Sthorpej# device event 111.1Sthorpej 121.1Sthorpejcase "${2}" in 131.1Sthorpejpressed) 141.3Smycroft /sbin/shutdown -r now "reset button pressed" 151.1Sthorpej exit 0 161.1Sthorpej ;; 171.1Sthorpej 181.1Sthorpej*) 191.2Smycroft logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1 201.1Sthorpej exit 1 211.1Sthorpej ;; 221.1Sthorpejesac 23