I am currently writing an RPM which contains both configuration and reversion scripts that will be run manually after the completion of the install.
When I deploy an older package I want to keep my existing reversion scripts, not overwrite them with the old ones. During an upgrade then the reversion scripts folder should be overwritten.
(Simplified: During the upgrade I want to add new scripts, during the downgrade I don't want the newer scripts removed.)
My current approach is to copy the old scripts to a temporary folder during the pre install which is working, and then copy them back to the reversion script folder in the post install which isn't. I can copy the files manually upon completion of the deployment.
I am using the following command:
'cp' -f TempScriptFolder ScriptFolder.
At this point I'm pretty confused by this RPM goop, and not really sure what else to try.
%post? - Etan Reisner