summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d2fb9fe)
current values when starting or stopping all steps
#
# description: Manages all PLC services on this machine
#
#
# description: Manages all PLC services on this machine
#
-# $Id: guest.init,v 1.18 2006/06/23 21:48:41 mlhuang Exp $
+# $Id: guest.init,v 1.19 2006/07/10 21:10:21 mlhuang Exp $
#
# Source function library and configuration
#
# Source function library and configuration
# Regenerate configuration files
reload ()
{
# Regenerate configuration files
reload ()
{
# Regenerate the main configuration file from default values
# overlaid with site-specific and current values.
files=(
# Regenerate the main configuration file from default values
# overlaid with site-specific and current values.
files=(
/etc/planetlab/plc_config.xml
)
for file in "${files[@]}" ; do
/etc/planetlab/plc_config.xml
)
for file in "${files[@]}" ; do
- if [ $file -nt /etc/planetlab/plc_config.xml ] ; then
+ if [ -n "$force" -o $file -nt /etc/planetlab/plc_config.xml ] ; then
tmp=$(mktemp /tmp/plc_config.xml.XXXXXX)
plc-config --xml "${files[@]}" >$tmp
if [ $? -eq 0 ] ; then
tmp=$(mktemp /tmp/plc_config.xml.XXXXXX)
plc-config --xml "${files[@]}" >$tmp
if [ $? -eq 0 ] ; then
done
# Convert configuration to various formats
done
# Convert configuration to various formats
- if [ /etc/planetlab/plc_config.xml -nt /etc/planetlab/plc_config ] ; then
+ if [ -n "$force" -o /etc/planetlab/plc_config.xml -nt /etc/planetlab/plc_config ] ; then
plc-config --shell >/etc/planetlab/plc_config
fi
plc-config --shell >/etc/planetlab/plc_config
fi
- if [ /etc/planetlab/plc_config.xml -nt /etc/planetlab/php/plc_config.php ] ; then
+ if [ -n "$force" -o /etc/planetlab/plc_config.xml -nt /etc/planetlab/php/plc_config.php ] ; then
mkdir -p /etc/planetlab/php
plc-config --php >/etc/planetlab/php/plc_config.php
fi
mkdir -p /etc/planetlab/php
plc-config --php >/etc/planetlab/php/plc_config.php
fi
shift 1
if [ -z "$1" ] ; then
# Start or stop everything. Regenerate configuration first.
shift 1
if [ -z "$1" ] ; then
# Start or stop everything. Regenerate configuration first.
else
# Start or stop a particular step
steps=("$@")
else
# Start or stop a particular step
steps=("$@")