I am generating a Linux image using Petalinux tools. I have added an existing recipe for PostgreSQL.
How can I alter the recipe so that the data location is NOT /var/lib/postgresql, but rather /var/lib/persist/postgresql ?
'/var/lib' is referenced in 4 scripts that are included in the recipe.
Without having more info to go off of for your situation, I would say you have a few options. You could change the data location by editing PostgreSQL's config file in /etc (postgresql.conf) or you could create a symlink in PostgreSQL's normal data location that points to the new location. Both of these things should be possible by editing your recipe's .bb file (if you wrote it) or adding a .bbappend file (if you are not the author of the .bb file).