Drop usage of $UID in scripts
[grml-autoconfig.git] / bin / save-config
index e2f9854..63483c0 100755 (executable)
@@ -23,7 +23,7 @@
 
   LANG=C
   LC_ALL=C
 
   LANG=C
   LC_ALL=C
-  [[ $UID != 0 ]] && runas='sudo' # important for /etc
+  [[ $(id -u) != 0 ]] && runas='sudo' # important for /etc
 
   check4progs mutt || echo "Warning, mutt not available for mail handling.">&2
   check4progs findchanged tar || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 }
 
   check4progs mutt || echo "Warning, mutt not available for mail handling.">&2
   check4progs findchanged tar || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 }