#!/usr/bin/perl
# cpanel - autofixer2/ensure_yum_has_assumeno     Copyright(c) 2016 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;

my $output = `yum --help | grep assumeno`;

if ( $? != 0 ) {
    print "!!!! yum needs --assumeno !! updating yum …\n";

    system("yum update -y yum");

    my $output = `yum --help | grep assumeno`;

    if ( $? != 0 ) {
        print "!!!! after an update yum still does not have --assumeno !!\n";
        exit(1);
    }
}

exit(0);
