1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-postgresql-0.0.1/root/etc/rc.d/init.d/pgsql.init mezzanine_patched_smeserver-postgresql-0.0.1/root/etc/rc.d/init.d/pgsql.init |
2 |
--- smeserver-postgresql-0.0.1/root/etc/rc.d/init.d/pgsql.init 2006-06-28 17:04:34.000000000 -0400 |
3 |
+++ mezzanine_patched_smeserver-postgresql-0.0.1/root/etc/rc.d/init.d/pgsql.init 2006-06-28 17:04:15.000000000 -0400 |
4 |
@@ -31,11 +31,15 @@ |
5 |
exit 0 |
6 |
fi |
7 |
|
8 |
-for i in $(seq 1 10) |
9 |
+M="Waiting for postgresql to startup: ." |
10 |
+for i in $(seq 1 30) |
11 |
do |
12 |
- # FIXME - we have a race condition here |
13 |
- if test -e /service/postgresql/supervise/pid |
14 |
+ if chpst -u postgres psql -f - template1 < /dev/null 2>/dev/null |
15 |
then |
16 |
+ if [ "$M" = "." ] |
17 |
+ then |
18 |
+ echo |
19 |
+ fi |
20 |
exit_value=0 |
21 |
HOME=/root |
22 |
export HOME |
23 |
@@ -59,8 +63,9 @@ |
24 |
done |
25 |
exit $exit_value |
26 |
fi |
27 |
- echo "Waiting for postgresql to startup" >&2 |
28 |
+ echo -n $M |
29 |
+ M=. |
30 |
sleep 2 |
31 |
done |
32 |
- |
33 |
+echo "Timed out waiting for postgresql to startup" >&2 |
34 |
exit 1 |
35 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-postgresql-0.0.1/root/var/service/postgresql/run mezzanine_patched_smeserver-postgresql-0.0.1/root/var/service/postgresql/run |
36 |
--- smeserver-postgresql-0.0.1/root/var/service/postgresql/run 2006-06-28 17:04:34.000000000 -0400 |
37 |
+++ mezzanine_patched_smeserver-postgresql-0.0.1/root/var/service/postgresql/run 2006-06-28 16:36:40.000000000 -0400 |
38 |
@@ -6,12 +6,12 @@ |
39 |
|
40 |
if [ ! -f ${DATA}/PG_VERSION ] |
41 |
then |
42 |
- echo "*** Initialising postgresql in data directory ${DATA}" |
43 |
- chpst -u postgres /usr/bin/initdb --pgdata=${DATA} |
44 |
if [ -f /home/e-smith/db/pgsql/pgsql.dump ] |
45 |
then |
46 |
/sbin/e-smith/expand-template /etc/e-smith/pgsql/init/00_restore_backup |
47 |
fi |
48 |
+ echo "*** Initialising postgresql in data directory ${DATA}" |
49 |
+ chpst -u postgres /usr/bin/initdb --pgdata=${DATA} |
50 |
fi |
51 |
echo "*** Starting postgresql on data ${DATA}" |
52 |
exec \ |