Muntasim-Ul-Haque writes: > Hi, > I need a tool that would make sure that, my computer would shutdown > after a specific command has been executed. This tool would just wait > for the Terminal for executing a command, like '/sudo apt-get upgrade/' > and then after the command has been executed, my computer would > shutdown.
If you execute <command> as root (better than using sudo) you can either issue from the # prompt command; shutdown -h now that shuts down the machine either if <command> is successful or fails while command && shutdown -h now shuts down the machine only if <command> is successful. On the other hand command || shutdown -h now shuts down the machine only if <command> fails If you don't run <command> as root you must either wait for <command> to end (to type the password) or be sure that it completes before the validity of the sudo password cache expires. -- /\ ___ Ubuntu: ancient /___/\_|_|\_|__|___Gian Uberto Lauri_____ African word //--\| | \| | Integralista GNUslamico meaning "I can \/ coltivatore diretto di software not install giĆ sistemista a tempo (altrui) perso... Debian" Warning: gnome-config-daemon considered more dangerous than GOTO -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/21157.49468.366735.40...@mail.eng.it