Contents of /alx-src/branches/alxconf-060/bin/user_shutdown.sh
Parent Directory | Revision Log
Revision 2494 -
(show annotations)
(download)
(as text)
Thu Jun 30 11:25:11 2011 UTC (12 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 421 byte(s)
Thu Jun 30 11:25:11 2011 UTC (12 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 421 byte(s)
-fixed check logic, returned true even if the prog was not found
1 | #!/bin/bash |
2 | # shuts the system down and displays a nice message |
3 | # $Id$ |
4 | |
5 | if [[ -x $(which Xdialog) ]] |
6 | then |
7 | Xdialog \ |
8 | --title "Shutdown" \ |
9 | --no-buttons \ |
10 | --infobox "System shutdown in progress ..." 6 34 5000 \ |
11 | & sudo /sbin/halt |
12 | elif [[ -x $(which xmessage) ]] |
13 | then |
14 | msg=" |
15 | System shutdown in progress ... |
16 | |
17 | " |
18 | xmessage -center -title "Shutdown" -buttons "" "${msg}" \ |
19 | & sudo /sbin/halt |
20 | else |
21 | sudo /sbin/halt |
22 | fi |