r5488 - trunk/cumin/bin

tmckay at fedoraproject.org tmckay at fedoraproject.org
Fri Sep 28 19:36:39 UTC 2012


Author: tmckay
Date: 2012-09-28 19:36:38 +0000 (Fri, 28 Sep 2012)
New Revision: 5488

Modified:
   trunk/cumin/bin/cumin-admin
   trunk/cumin/bin/cumin-database
Log:
Tweaks to cumin-admin and cumin-database for postgres user / setuid changes
in the previous commit


Modified: trunk/cumin/bin/cumin-admin
===================================================================
--- trunk/cumin/bin/cumin-admin	2012-09-28 19:02:09 UTC (rev 5487)
+++ trunk/cumin/bin/cumin-admin	2012-09-28 19:36:38 UTC (rev 5488)
@@ -120,11 +120,14 @@
         app.db_init(schema_version_check=False)
     except OperationalError:
         print "Can't talk to the database"
+        print "Run 'cumin-database check' as root for more information" 
         if setuid_dev_user:
-            error("Root did setuid to the local dev user. "\
-                  "Try again with --no-dev-user?")
-        else:    
-            error("Run 'cumin-database check' as root for more information")
+            print "Hint: root did setuid to the local dev user."
+            print "      Has the dev postgres user been created?"
+            print "      Maybe try again with --no-dev-user"
+        elif uid != 0:
+            print "Hint: has the dev postgres user been created?"
+        sys.exit(1)
     
     conn = app.database.get_connection()
     cursor = conn.cursor()

Modified: trunk/cumin/bin/cumin-database
===================================================================
--- trunk/cumin/bin/cumin-database	2012-09-28 19:02:09 UTC (rev 5487)
+++ trunk/cumin/bin/cumin-database	2012-09-28 19:36:38 UTC (rev 5488)
@@ -298,14 +298,14 @@
     if [[ $CUMIN_DEVEL_INSTANCE ]]; then
         # If add_dev_user is 'yes' then we created a dev 
         # postgres user above, let cumin-admin setuid 
-	# to the dev user.
+        # to the dev user.
 
         # Otherwise, make it setuid to the cumin user with
         # logging set to /dev/null to ensure that the
-	# schema is created and we don't have log ownership issues.
+        # schema is created and we don't have log ownership issues.
 
-	# If they did not create the dev postgres user, and there
-	# is no cumin user on the system, they are in trouble.
+        # If they did not create the dev postgres user, and there
+        # is no cumin user on the system, they are in trouble.
 	if [[ $add_dev_user == "yes" ]]; then
 	    echo Creating schema as the \'$dev_postgres_user\' user
 	    cumin-admin create-schema



More information about the cumin-developers mailing list