reverted rev 82
[grml-scripts.git] / usr_sbin / suspenduser_gui.sh
1 #!/bin/sh
2 # Filename:      suspenduser_gui.sh
3 # Purpose:       dialog interface for suspend user
4 # Authors:       grml-team (grml.org), (c) Nico Golde <nico@grml.org>, (c) Michael Prokop <mika@grml.org>
5 # License:       This file is licensed under the GPL v2.
6 # Latest change: Thu Jan 12 22:15:45 CET 2006 [mika]
7 ################################################################################
8
9 PATH=${PATH:-'/usr/bin:/usr/sbin'}
10
11 if [ "$(whoami)" != "root" ] ; then
12   echo "Error. You must be 'root' to run this command." >&2
13   exit 1
14 fi
15
16 dialog --stdout --title "Suspend User" --msgbox "Welcome to Suspend User
17
18 This script allows you to suspend a user from your system for
19 an indefinite time." 8 65
20
21 GETUSER=$(dialog --stdout --title "Suspend User" --inputbox "User to suspend:" 0 40) || exit 0
22 SUSPENDUSER=${GETUSER%/*}
23 suspenduser.sh $SUSPENDUSER
24
25 ## END OF FILE #################################################################