Commit fdca2b6
committed
Fixed hub install aborting when there is no PostgreSQL backup to preserve
init_postgres_dir() took the "preserve the old pg_*.conf" branch on any
upgrade, but preinstall.sh only populates $BACKUP_DIR/data when a PostgreSQL
major version migration is needed and $PREFIX/state/pg/data exists. Upgrading
within a major version, or after removing the data directory as preinstall.sh
suggests to skip the migration, made the glob match nothing and aborted the
whole scriptlet under `set -e`.
Ticket: ENT-11934
Changelog: title
Signed-off-by: Nick Anderson <nick.anderson@northern.tech>
(cherry picked from commit e1dfd1f)1 parent 654930e commit fdca2b6
2 files changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
439 | 454 | | |
440 | 455 | | |
441 | 456 | | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | 457 | | |
447 | 458 | | |
448 | 459 | | |
| |||
817 | 828 | | |
818 | 829 | | |
819 | 830 | | |
820 | | - | |
| 831 | + | |
| 832 | + | |
821 | 833 | | |
822 | 834 | | |
823 | 835 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| |||
0 commit comments