Skip to content

Make sure posttrans script doesn't fail if restorecon is not installed

By default, scripts exit with the exit code of the last command executed. This also applies to "command -v restorecon && ..." after which $? will contain 1 if restorecon is not installed. This means that if /boot/symvers-xxx does not exist yet and restorecon is not installed, the posttrans script will fail. Fix this by switching to a regular if statement, which does not affect the exit status if restorecon is not installed.

(cherry picked from commit 969fc65d)

Merge request reports