Hi Paulo:
Pretty good for a quick hack!
I can suggest a few changes:
1. Use grep -i instead of grep -o
DIST=$(grep -i fedora <<< "$ID1")
2. I'd make is to force $DIST to lowercase and check against "mandriva"
or "debian".
DIST=`echo $DIST | tr A-Z a-z`
That way, you'll drop a few extraneous tests.
3. Ensure the script is run as root
http://serverfault.com/questions/37829/bash-scripting-require-script-to-be-run-as-root-or-with-sudo
Cheers,
jec
--
E-mail to [email protected] for instructions on how to unsubscribe
List archives are available at http://listarchives.libreoffice.org/www/projects/
All messages you send to this list will be publicly archived and cannot be
deleted