I think UID is better than "root" string.

This commit is contained in:
kokojop 2020-12-15 00:35:21 +09:00 committed by GitHub
parent af6ce8854d
commit 3faf61d05d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -296,9 +296,7 @@ fi
################
# Got root?
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
if (( $EUID != 0 )); then
echo "Need to run as root ..."
exit
fi