cannot run db-config in api script, since the password is being setup manually here
authorMark Huang <mlhuang@cs.princeton.edu>
Wed, 24 Jan 2007 21:05:30 +0000 (21:05 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Wed, 24 Jan 2007 21:05:30 +0000 (21:05 +0000)
plc.d/api
plc.d/db

index c88ed31..1f9d138 100755 (executable)
--- a/plc.d/api
+++ b/plc.d/api
@@ -8,7 +8,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id$
+# $Id: api,v 1.8 2007/01/19 20:05:05 mlhuang Exp $
 #
 
 # Source function library and configuration
@@ -48,10 +48,6 @@ case "$1" in
        PLC_API_MAINTENANCE_SOURCES=${PLC_API_MAINTENANCE_SOURCES[*]}
        plc-config --category=plc_api --variable=maintenance_sources --value="$PLC_API_MAINTENANCE_SOURCES" --save
 
-       # Bootstrap the DB
-       db-config
-       check
-
        result "$MESSAGE"
        ;;
 esac
index 9e41332..b249ca9 100755 (executable)
--- a/plc.d/db
+++ b/plc.d/db
@@ -7,7 +7,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: db,v 1.2 2006/10/27 20:27:04 mlhuang Exp $
+# $Id$
 #
 
 # Source function library and configuration
@@ -42,6 +42,10 @@ DELETE FROM variable WHERE name = 'site_name';
 INSERT INTO variable (name, value) VALUES ('site_name', 's:${#PLC_NAME}:"$PLC_NAME";');
 EOF
 
+       # Bootstrap the DB
+       db-config
+       check
+
        result "$MESSAGE"
        ;;
 esac