Drop usage of $UID in scripts; Do not use a negative exit value in shellscripts
[grml-scripts-core.git] / usr_sbin / prepare_tmpfs.sh
index 3208fcc..229fa79 100755 (executable)
@@ -6,7 +6,7 @@
 # License:       This file is licensed under the GPL v2.
 ################################################################################
 
-if [ $UID != 0 ]; then
+if [ $(id -u) != 0 ] ; then
   echo "Error: $0 requires root permissions. Exiting."
   exit 1
 fi