#!/bin/sh xmessage -buttons reboot,halt,poweroff "$@" "" case "$?" in 101) /sbin/reboot ;; 102) /sbin/halt ;; 103) /sbin/poweroff ;; esac