Annotation of loncom/build/CHECKRPMS.default, revision 1.1

1.1     ! harris41    1: #!/usr/bin/perl
        !             2: 
        !             3: my $RHversion = (split /\s/, `cat /etc/redhat-release`)[4];
        !             4: my $FTPSERVER;
        !             5: `ping -q -c 1 mirror.pa.msu.edu 2>/dev/null`;
        !             6: if (!$FTPSERVER and $?==0) {
        !             7:     `ncftpls ftp://mirror.pa.msu.edu`;
        !             8:     if ($?==0) {
        !             9: 	$FTPSERVER="mirror.pa.msu.edu";
        !            10:    $FTPUPDATES="mirror.pa.msu.edu/linux/redhat/linux/updates/$RHversion/en/os";
        !            11:     }
        !            12: }
        !            13: `ping -q -c 1 rufus.w3.org 2>/dev/null`;
        !            14: if (!$FTPSERVER and $?==0) {
        !            15:     `ncftpls ftp://rufus.w3.org`;
        !            16:     if ($?==0) {
        !            17: 	$FTPSERVER="rufus.w3.org";
        !            18: 	$FTPUPDATES="rufus.w3.org/linux/redhat/updates/$RHversion/en/os";
        !            19:     }
        !            20: }
        !            21: if (!$FTPSERVER) {
        !            22:     print "Cannot find a working ftp server.\n";
        !            23: }
        !            24: print "Using $FTPSERVER for ftp transaction...(please be patient)\n";
        !            25: my @rpms=`perl loncom/build/check-rpms -ftp $FTPUPDATES`;
        !            26: if (@rpms) {
        !            27:     my $rpm_count=scalar(@rpms);
        !            28:     print(<<END);
        !            29: **** WARNING **** You need to update at least $rpm_count RPMS shown in 
        !            30: the list below.  THIS IS IMPORTANT FOR SECURITY.
        !            31: 
        !            32: END
        !            33:     print join("\n",map {chomp;$_} @rpms)."\n";
        !            34:     print(<<END);
        !            35: 
        !            36: Please visit ftp://$FTPUPDATES
        !            37: and download the RPMS you need.
        !            38: For instructions on working with (and upgrading) RPMS, please
        !            39: visit http://www.rpm.org/max-rpm/.
        !            40: END
        !            41: }
        !            42: else {
        !            43:     print(<<END);
        !            44: **** NOTE **** All RPMS on your system appear to be up to date.
        !            45: END
        !            46: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>