Hi, Dolson!
Just a few things about your script
QUOTE
...
# You need to be r00t!!!!111111oneoneone
if [ $USER != "root" ]; then
clear
echo You need to be root.
exit
fi
...
Instead of using the
"$USER" != "root" one; for example:
CODE
~$ su
Password: XXXXXXXXX
~# echo $USER
arusabal
~# echo $UID
0
Unles you run "su -" or start a console directly as root the $USER variable keeps untouched because you don't login as root; so it is better to check the UID number.
QUOTE
# Make a temp dir for all the work.
mkdir avptmp
cd avptmp
Whereever you are? wouldn't be better to define a full path to the temp directory, something like
mkdir -p /tmp/avptmp
I have complaints about the rest of the script, mostly because there aren't checks at all (except in punctual user interactive points) to see if the previous command went right before executing the next one. Implementing some checks is as easy as check the return status of the previous command, or put things like "command || exit $?"
Oh! instead of thousands of echos, you can use a few here documents (<<-EOF [...] EOF) either for the stdout output or the script generators (would be easier to maintain later).
Despite what it seems, this is a friendly post