git://git.onelab.eu
/
myplc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- sigh, try again to fix merge of maintenance_sources
[myplc.git]
/
plc.d
/
api
diff --git
a/plc.d/api
b/plc.d/api
index
08d58c2
..
c88ed31
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
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id
: api,v 1.4 2006/06/23 21:41:31 mlhuang Exp
$
+# $Id$
#
# Source function library and configuration
#
# Source function library and configuration
@@
-27,9
+27,6
@@
case "$1" in
MESSAGE=$"Configuring the API"
dialog "$MESSAGE"
MESSAGE=$"Configuring the API"
dialog "$MESSAGE"
- # Generate old DB configuration file
- ln -sf plc_config /etc/planetlab/plc_db
-
# Make sure that the API maintenance account is protected by a
# password.
if [ -z "$PLC_API_MAINTENANCE_PASSWORD" ] ; then
# Make sure that the API maintenance account is protected by a
# password.
if [ -z "$PLC_API_MAINTENANCE_PASSWORD" ] ; then
@@
-39,16
+36,20
@@
case "$1" in
# Make sure that all PLC servers are allowed to access the API
# through the maintenance account.
# Make sure that all PLC servers are allowed to access the API
# through the maintenance account.
- PLC_API_MAINTENANCE_SOURCES=$(
+ PLC_API_MAINTENANCE_SOURCES=($((
+ for ip in $PLC_API_MAINTENANCE_SOURCES ; do
+ echo $ip
+ done
for server in API BOOT WWW ; do
hostname=PLC_${server}_HOST
gethostbyname ${!hostname}
for server in API BOOT WWW ; do
hostname=PLC_${server}_HOST
gethostbyname ${!hostname}
- done | sort -u
- )
+ done
+ ) | sort -u))
+ PLC_API_MAINTENANCE_SOURCES=${PLC_API_MAINTENANCE_SOURCES[*]}
plc-config --category=plc_api --variable=maintenance_sources --value="$PLC_API_MAINTENANCE_SOURCES" --save
plc-config --category=plc_api --variable=maintenance_sources --value="$PLC_API_MAINTENANCE_SOURCES" --save
- #
Generate old API configuration file
-
api
-config
+ #
Bootstrap the DB
+
db
-config
check
result "$MESSAGE"
check
result "$MESSAGE"