more conventional notation for site and prefix as replaced by db-config
Thierry Parmentelat [Tue, 22 Apr 2008 09:43:31 +0000 (09:43 +0000)]
db-config
plc_sliceinitscripts/sirius

index 46ade07..275b5a3 100755 (executable)
--- a/db-config
+++ b/db-config
@@ -537,7 +537,7 @@ def main():
             file = open(root + "/" + f, "ro")
             default_initscripts.append({"name": plc['slice_prefix'] + "_" + f,
                                         "enabled": True,
-                                        "script": file.read().replace("XXXSITEXXX", url).replace("XXXPREFIXXXX", plc['slice_prefix'])})
+                                        "script": file.read().replace("@SITE@", url).replace("@PREFIX@", plc['slice_prefix'])})
             file.close()
 
     # Get list of existing initscripts
index 8dd41be..6cbf443 100644 (file)
@@ -106,7 +106,9 @@ class Periodic:
 
 SLOTDURATION = ONEHOUR
 
-SCHEDULEURL = 'XXXSITEXXX/planetlab/sirius/schedule.txt'
+# instances of @SITE@ and @PREFIX@ below are replaced 
+# as appropriate by db-config
+SCHEDULEURL = '@SITE@/planetlab/sirius/schedule.txt'
 
 schedulelock = threading.Lock()
 
@@ -166,7 +168,7 @@ def updateloans():
     log('Current loans are %s' % loans)
 
     if DEBUGLEVEL < 2:
-        nodemanager.SetLoans('XXXPREFIXXXX_sirius', loans)
+        nodemanager.SetLoans('@PREFIX@_sirius', loans)
     log('Updated loans successfully')
 
     recipientcond.acquire()