From: Thierry Parmentelat Date: Tue, 29 Nov 2011 15:08:50 +0000 (+0100) Subject: attempt to fix startup sequence X-Git-Tag: sfa-2.0-1~3^2~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1cc5655cb474079e27e5e787b25c7baeea3fce6c;p=sfa.git attempt to fix startup sequence --- diff --git a/init.d/sfa b/init.d/sfa index a3cd5447..3e733eed 100755 --- a/init.d/sfa +++ b/init.d/sfa @@ -85,10 +85,10 @@ function reload () { # Convert configuration to various formats if [ -n "$force" -o $sfa_whole_config -nt /etc/sfa/sfa_config ] ; then - plc-config --shell $sfa_whole_config >/etc/sfa/sfa_config + plc-config --shell $sfa_whole_config > /etc/sfa/sfa_config fi if [ -n "$force" -o $sfa_whole_config -nt /etc/sfa/sfa_config.py ] ; then - plc-config --python $sfa_whole_config >/etc/sfa/sfa_config.py + plc-config --python $sfa_whole_config > /etc/sfa/sfa_config.py fi # if [ -n "$force" -o $sfa_whole_config -nt /etc/sfa/php/sfa_config.php ] ; then # mkdir -p /etc/sfa/php @@ -101,6 +101,10 @@ function reload () { # (or there is no myplc at all) this should be turned off # as the component manager is not operational yet we skip this for now #gen-sfa-cm-config.py + + # reload the shell version + [ -f /etc/sfa/sfa_config ] && . /etc/sfa/sfa_config + } ### initialize DB (don't chkconfig postgresql on) @@ -209,7 +213,7 @@ function db_start () { if ! psql -U $SFA_DB_USER -c "" $SFA_DB_NAME >/dev/null 2>&1 ; then createdb -U postgres --template=template0 --encoding=UNICODE --owner=$SFA_DB_USER $SFA_DB_NAME check - # xxx in case we'd like to ship the db schema separately + # install db schema psql -U $SFA_DB_USER -f /usr/share/sfa/sfa.sql $SFA_DB_NAME check fi