Skip to content

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

DaanDeMeyer requested to merge DaanDeMeyer/kernel-ark:fix-posttrans into os-build

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.

Merge request reports