#!/bin/sh # Aus.sh v2.3.2 (c) 15.4.96 by Andreas Ley (u) 20.8.2003 # Script to allow system shutdown or reboot for anyone from the console PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc export PATH GRACEVALUE="3" LOGNAME=`logname` if test "${LOGNAME}" = "reboot"; then OPTIONS="-r" TITLE="Reboot" QUESTION="Wollen sie wirklich den Rechner neustarten?" else OPTIONS="-h" TITLE="Shutdown" QUESTION="Wollen sie wirklich den Rechner herunterfahren?" fi case "`tty`" in %ifdef OS_AIX /dev/lft0) :;; %elif OS_LINUX /dev/tty[0-9]|/dev/vc/[0-9]) :;; %else /dev/console) :;; %endif *) echo echo "${TITLE} nur von der Console aus !!!" >&2 exit 1;; esac trap "clear; exit 0" 2 3 5 14 15 trap "" 1 if test `who | wc -l` -gt 1; then clear cat <