How to exit rpm install in case of an error

前端 未结 2 362
伪装坚强ぢ
伪装坚强ぢ 2021-01-13 18:24

I am looking for a way to exit rpm install if some condition is false. I have added a small script in the %pre section that exits install if my condition fails.

The

相关标签:
2条回答
  • 2021-01-13 18:41

    If you need this just to make sure there is certain file in the filesystem, you can do simple

    Requires: /path/to/expected/file
    

    Otherwise you are indeed out of luck probably.

    I could think of extremely ugly solution that would involve killing rpm from within scriptlet, but that is beyond evil :-)

    0 讨论(0)
  • 2021-01-13 18:49

    Did you try to use Verification Scripts? Writing Verification Scripts

    0 讨论(0)
提交回复
热议问题