MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //proc/self/root/scripts.20110531.215904.25158/fontconfigfix
#!/usr/bin/perl
# cpanel12 - fontconfigfix                   Copyright(c) 2004-2008 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

exit if !-e '/etc/redhat-release';

my $rpm = find_rpm();

exit if !$rpm;

if ( -e '/usr/share/man/man5/fonts-conf.5.gz' && -x $rpm ) {
    my $rpmdata = `$rpm -q --qf "%{ARCH} %{VERSION} %{RELEASE}" fontconfig`;
    chomp $rpmdata;
    my ( $arch, $version, $build ) = split( /\s+/, $rpmdata );
    if ( $arch && $version && $build && $arch eq 'x86_64' && $version eq '2.2.3' && $build eq '7' ) {
        system $rpm, '-e', '--nodeps', 'fontconfig-2.2.3-7';
    }
}

sub find_rpm {
#FIXME: should use _find_bin here after it gets broken out from MysqlUtils
    
    my @locations = qw( /bin /usr/bin /sbin /usr/sbin );
    foreach my $dir (@location) {
        if ( -x $dir . '/rpm' ) {
            return $dir . '/rpm';
            last;
        }
    }
    return;
}