[Lunar-commits] r18103 - lunar/trunk/var/lib/lunar/functions

Auke Kok sofar at lunar-linux.org
Fri Jan 13 17:14:17 UTC 2006


Author: sofar
Date: 2006-01-13 17:14:16 +0000 (Fri, 13 Jan 2006)
New Revision: 18103

Modified:
   lunar/trunk/var/lib/lunar/functions/init.lunar
Log:
Don't assume uid 0 == root, instead check if uid($USER) == 0, allows to change the root username to something else. (/me waves to redkennedy).


Modified: lunar/trunk/var/lib/lunar/functions/init.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/init.lunar	2006-01-13 02:31:31 UTC (rev 18102)
+++ lunar/trunk/var/lib/lunar/functions/init.lunar	2006-01-13 17:14:16 UTC (rev 18103)
@@ -31,7 +31,7 @@
 enviro_check() {
   debug_msg "enviro_check ($@)"
   if [ -z $LUNAR_INSTALL ]; then
-    if [ -z "$SHELL" ] || [ "$USER" != "root" ] ; then
+    if [ -z "$SHELL" ] || [ "$(getent passwd $USER | cut -d: -f3)" != "0" ] ; then
       message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
               "You are not running a fully initialized root shell, consider" 
       message "running a proper root shell with 'su -'" \



More information about the Lunar-commits mailing list