69200e scriptlets: always existence-check /etc/selinux/config

Authored and Committed by Adam Williamson 4 years ago
    scriptlets: always existence-check /etc/selinux/config
    
    This does not work as expected with `/bin/sh` if the file does
    not exist:
    
    . %{_sysconfdir}/selinux/config &> /dev/null || true;
    
    when run with `/bin/sh` (as opposed to `/bin/bash`) it exits 1
    if the file does not exist. It exits 0 if the file exists but
    there is an error parsing it. When run with `/bin/bash` it exits
    0 in both cases as expected, but RPM scriptlets are run with sh.
    
    To avoid this problem, we must always explicitly do an existence
    check on the file before attempting to source it.
    
    Signed-off-by: Adam Williamson <awilliam@redhat.com>
    
        
file modified
+15 -5