From 309572ab8b4843bb6507b0b3f6dc5e5240af257b Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Tue, 25 Apr 2006 21:18:19 +0000 Subject: [PATCH] - don't source shell configuration in /etc/plc.d/functions, which is also sourced by the guest initscript, which tries to regenerate the configuration and will pick up stale values --- plc.d/api | 3 ++- plc.d/bootcd | 3 ++- plc.d/bootmanager | 3 ++- plc.d/crond | 3 ++- plc.d/functions | 7 +------ plc.d/gpg | 3 ++- plc.d/httpd | 3 ++- plc.d/mail | 3 ++- plc.d/network | 3 ++- plc.d/postgresql | 3 ++- plc.d/ssh | 3 ++- plc.d/ssl | 3 ++- plc.d/syslog | 3 ++- 13 files changed, 25 insertions(+), 18 deletions(-) diff --git a/plc.d/api b/plc.d/api index ecbcdef..61dd0c0 100755 --- a/plc.d/api +++ b/plc.d/api @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: api,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ +# $Id: api,v 1.2 2006/04/10 16:00:47 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config # Export so that we do not have to specify -p to psql invocations export PGPORT=$PLC_DB_PORT diff --git a/plc.d/bootcd b/plc.d/bootcd index 0a3c0a8..dc7bf5e 100755 --- a/plc.d/bootcd +++ b/plc.d/bootcd @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: bootcd,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/bootmanager b/plc.d/bootmanager index e93cffa..f2d08c8 100755 --- a/plc.d/bootmanager +++ b/plc.d/bootmanager @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: bootmanager,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/crond b/plc.d/crond index 67cfb3f..5bb5ba7 100755 --- a/plc.d/crond +++ b/plc.d/crond @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: crond,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/functions b/plc.d/functions index 71aaf3f..92a236f 100644 --- a/plc.d/functions +++ b/plc.d/functions @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: functions,v 1.2 2006/04/07 04:27:56 mlhuang Exp $ +# $Id: functions,v 1.3 2006/04/10 15:53:49 mlhuang Exp $ # export PATH=/sbin:/bin:/usr/bin:/usr/sbin @@ -13,11 +13,6 @@ export PATH=/sbin:/bin:/usr/bin:/usr/sbin # Source function library . /etc/init.d/functions -# Source configuration if it exists -if [ -f /etc/planetlab/plc_config ] ; then - . /etc/planetlab/plc_config -fi - # Total number of errors ERRORS=0 diff --git a/plc.d/gpg b/plc.d/gpg index 12b8d96..52f6aed 100755 --- a/plc.d/gpg +++ b/plc.d/gpg @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: gpg,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/httpd b/plc.d/httpd index 637c210..5dba112 100755 --- a/plc.d/httpd +++ b/plc.d/httpd @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: httpd,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config # Default locations DocumentRoot=/var/www/html diff --git a/plc.d/mail b/plc.d/mail index 129bb3d..6698a68 100755 --- a/plc.d/mail +++ b/plc.d/mail @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: httpd,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ +# $Id: mail,v 1.1 2006/04/24 15:49:32 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/network b/plc.d/network index b412d18..c00f9d3 100755 --- a/plc.d/network +++ b/plc.d/network @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: network,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/postgresql b/plc.d/postgresql index 2f46e3c..9095828 100755 --- a/plc.d/postgresql +++ b/plc.d/postgresql @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: postgresql,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config # Default locations PGDATA=/var/lib/pgsql/data diff --git a/plc.d/ssh b/plc.d/ssh index 1476cf1..1cc3ac1 100755 --- a/plc.d/ssh +++ b/plc.d/ssh @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: ssh,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config # XXX Could make these configurable KEY_TYPE_ROOT=rsa diff --git a/plc.d/ssl b/plc.d/ssl index 77c2445..fc3fa74 100755 --- a/plc.d/ssl +++ b/plc.d/ssl @@ -7,11 +7,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: ssl,v 1.2 2006/04/07 03:36:04 mlhuang Exp $ +# $Id: ssl,v 1.3 2006/04/07 04:28:16 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) diff --git a/plc.d/syslog b/plc.d/syslog index fe3c1bd..9dc7a06 100755 --- a/plc.d/syslog +++ b/plc.d/syslog @@ -10,11 +10,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $ +# $Id: syslog,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions +. /etc/planetlab/plc_config case "$1" in start) -- 2.45.2