|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /scripts/ |
Upload File : |
#!/bin/sh
eval 'if [ -x /usr/bin/perl ]; then exec /usr/bin/perl -x -- $0 ${1+"$@"}; else exec /usr/local/cpanel/3rdparty/bin/perl -x $0 ${1+"$@"}; fi;'
if 0;
#!/usr/bin/perl
# cpanel - scripts/redhat5_pathtools_fixer Copyright(c) 2015 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
package scripts::redhat5_pathtools_fixer;
use strict;
use Config;
BEGIN { unshift @INC, '/usr/local/cpanel' }
use Cpanel::GenSysInfo ();
exit( script() ) unless caller();
sub script {
# We're only doing this on RHEL 5 distros.
my $distro_ver = Cpanel::GenSysInfo::get_rpm_distro_version();
$distro_ver == 5 or return 0;
if ( $^X ne '/usr/bin/perl' ) {
print "This script is designed to work on /usr/bin/perl. There doesn't appear to be one. Exiting...\n";
return 0;
}
# Only try to fix an overwrite of Cwd from yum if Cwd.so is segfaulting.
is_pathtools_broken() or return 0;
print "PathTools (Cwd / File::Spec) are broken. Bugzilla 1150717. Attempting to repair\n\n";
# Remove the PathTools provided files to fully revert back to the rpm version.
my $cpan_base_install = $Config{'installarchlib'} or die "\%Config is broken. Re-install perl.";
foreach my $file (qw{File/Spec File/Spec/Cygwin File/Spec/Epoc File/Spec/Functions File/Spec/Mac File/Spec/OS2 File/Spec/Unix File/Spec/VMW File/Spec/Win32}) {
unlink "$cpan_base_install/$file.pm";
}
print "Reverted to the RPM version of PathTools files. Attempting to re-install the newer version from CPAN\n\n";
# Try to re-install Cwd.
system( '/scripts/perlinstaller', 'Cwd' );
return 0;
}
sub is_pathtools_broken {
my $output = `/usr/bin/perl -MExtUtils::MakeMaker -e1 2>&1` || '';
return $output =~ m/\QAttempt to free unreferenced scalar\E/ms ? 1 : 0;
}
1;