/[smecontribs]/rpms/smeserver-postgresql/contribs10/smeserver-postgresql-0.2.0-bz12290.patch
ViewVC logotype

Annotation of /rpms/smeserver-postgresql/contribs10/smeserver-postgresql-0.2.0-bz12290.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Dec 27 03:43:01 2022 UTC (17 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-postgresql-0_2_0-4_el7_sme, HEAD
* Mon Dec 26 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.2.0-4.sme
- fix failing pgsql.init service preventing restore [SME: 12290]

1 jpp 1.1 diff -Nur --no-dereference smeserver-postgresql-0.2.0.old/root/etc/e-smith/templates/etc/e-smith/pgsql/init/00_restore_backup smeserver-postgresql-0.2.0/root/etc/e-smith/templates/etc/e-smith/pgsql/init/00_restore_backup
2     --- smeserver-postgresql-0.2.0.old/root/etc/e-smith/templates/etc/e-smith/pgsql/init/00_restore_backup 2021-11-23 14:33:57.000000000 -0500
3     +++ smeserver-postgresql-0.2.0/root/etc/e-smith/templates/etc/e-smith/pgsql/init/00_restore_backup 2022-12-26 22:40:59.451000000 -0500
4     @@ -2,12 +2,12 @@
5     use warnings;
6     use strict;
7    
8     -$ENV\{PATH\} = "/usr/bin";
9     +$ENV\{PATH\} = "/usr/pgsql-13/bin/:/usr/bin";
10     delete $ENV\{BASH_ENV\};
11    
12     if (-e "/home/e-smith/db/pgsql/pgsql.dump")
13     \{
14     open(STDIN, "/home/e-smith/db/pgsql/pgsql.dump");
15     - exec(qw(chpst -u postgres psql -q -f - template1));
16     + exec(qw(chpst -u postgres /usr/pgsql-13/bin/psql -q -f - template1));
17     \}
18     exit 0;
19     diff -Nur --no-dereference smeserver-postgresql-0.2.0.old/root/etc/rc.d/init.d/pgsql.init smeserver-postgresql-0.2.0/root/etc/rc.d/init.d/pgsql.init
20     --- smeserver-postgresql-0.2.0.old/root/etc/rc.d/init.d/pgsql.init 2021-11-11 12:04:18.000000000 -0500
21     +++ smeserver-postgresql-0.2.0/root/etc/rc.d/init.d/pgsql.init 2022-12-26 22:39:30.641000000 -0500
22     @@ -32,10 +32,13 @@
23     exit 0
24     fi
25    
26     +psql='/usr/pgsql-13/bin/psql'
27     +createdb='/usr/pgsql-13/bin/createdb'
28     +
29     M="Waiting for postgresql to startup: ."
30     for i in $(seq 1 30)
31     do
32     - if chpst -u postgres psql -f - template1 < /dev/null 2>/dev/null
33     + if chpst -u postgres $psql -f - template1 < /dev/null 2>/dev/null
34     then
35     if [ "$M" = "." ]
36     then
37     @@ -50,8 +53,8 @@
38     case $F in
39     *.sql)
40     D=$(echo $F | sed 's/\.sql$//')
41     - action "Creating database $D in postgresql" chpst -u postgres createdb -T template0 $D
42     - action "Loading $F into postgresql" chpst -u postgres /usr/bin/psql $D < $link && /bin/rm $link
43     + action "Creating database $D in postgresql" chpst -u postgres $createdb -T template0 $D
44     + action "Loading $F into postgresql" chpst -u postgres $psql $D < $link && /bin/rm $link
45     ;;
46     *)
47     action "Loading $F into postgresql" chpst -u postgres $link && /bin/rm $link

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed