# 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: api,v 1.8 2007/01/19 20:05:05 mlhuang Exp $
#
# Source function library and configuration
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 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}
- 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
- # Generate old API configuration file
- api-config
- check
-
result "$MESSAGE"
;;
esac