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: //scripts.20110531.215904.25158/installrpm2
#!/usr/bin/perl
# cpanel - installrpm2                            Copyright(c) 2010 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

BEGIN {
    if ( -e '/var/cpanel/brokenfutex' ) {
        $ENV{'LD_ASSUME_KERNEL'} = '2.4.1';
    }
    unshift @INC, '/scripts', '/usr/local/cpanel';
}

use Cpanel::OSSys   ();
use Cpanel::Sys::OS ();
use Cpanel::SysPkgs ();

$| = 1;

my ( $system, $release, $machine ) = ( Cpanel::OSSys::uname() )[ 0, 2, 4 ];
my ( $force, $nodeps, $nomirrors );
my $rpm = 0;

while ( $ARGV[0] =~ m/^--/ ) {
    my $arg = shift(@ARGV);
    if ( $arg =~ m/nodeps/ ) {
        $nodeps = 1;
    }
    if ( $arg =~ m/no-mirrors/ ) {
        $nomirrors = 1;
    }
    if ( $arg =~ m/force/ ) {
        $force = 1;
    }
}

my $os = Cpanel::Sys::OS::getos();
if ( $os =~ m/mandrake/ ) {
    my $syspkgobj = Cpanel::SysPkgs->new();
    if ( !$syspkgobj ) { die print "Could not create SysPkgs object\n"; }
    $syspkgobj->install( 'pkglist' => \@ARGV );
    exit;
}

if ( -e '/var/cpanel/useyum' ) {
    system '/scripts/checkyum', '--kernel';
    system 'yum',               '-y', 'install', @ARGV;
    system '/scripts/checkyum', '--nokernel';
    exit;
}
if ( -e '/var/cpanel/useswup' ) {
    exec( '/usr/bin/swup', '--install', @ARGV );
    exit();
}
if ( -e '/var/cpanel/userug' ) {
    exec( '/usr/bin/rug', '-y', 'install', @ARGV );
    exit();
}
if ( -e '/var/cpanel/useemerge' ) {
    exec( '/usr/bin/emerge', @ARGV );
    exit();
}
if ( -e '/var/cpanel/useup2date' ) {
    if ( $ENV{'USEARCH'} ) {
        exec( 'up2date', '--nox', '-i', "--arch=$ENV{'USEARCH'}", @ARGV );
    }
    else {
        exec( 'up2date', '--nox', '-i', @ARGV );
    }
    exit();
}

if ( $system =~ m/freebsd/i ) {
    exec '/scripts/ensurepkg2', @ARGV;
    exit;    #not reached
}

require cPanelRPM;
foreach my $arg (@ARGV) {
    if ( $rpm eq 0 ) { $rpm = cPanelRPM->new; }
    $rpm->install( "$arg", $force, $nodeps, "", "", $nomirrors );
}