1

I read the post Differences between %pre and %post in Kickstart on CentOS?, which includes the following statement: %post runs chrooted into the new install root, or it can run in the root of anaconda (with %post --nochroot), where you can access the files you might have created/saved during %pre.

How can these files be accessed, exactly? Can I access these files (which were created during %pre) in an RPM package %post scriptlet? If so, how?

1

Kickstart and RPM are different beasts. %pre and %post section of Kickstart is totally different from %pre and %post of RPM package. They have the same name, more or less similar purpose (doing something before and after), but are part of different objects.

If you want to save/restore state between %pre and %post in RPM package then see: https://fedoraproject.org/wiki/Packaging:Scriptlets#Saving_state_between_scriptlets

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.