[LON-CAPA-cvs] cvs: loncom /build CHECKRPMS.fedora

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jul 2004 21:01:51 -0000


matthew		Mon Jul 19 17:01:51 2004 EDT

  Modified files:              
    /loncom/build	CHECKRPMS.fedora 
  Log:
  More verboseness in message.
  
  
Index: loncom/build/CHECKRPMS.fedora
diff -u loncom/build/CHECKRPMS.fedora:1.1 loncom/build/CHECKRPMS.fedora:1.2
--- loncom/build/CHECKRPMS.fedora:1.1	Mon Jul 12 15:24:49 2004
+++ loncom/build/CHECKRPMS.fedora	Mon Jul 19 17:01:51 2004
@@ -2,7 +2,7 @@
 #
 # The LearningOnline Network with CAPA
 #
-# $Id: CHECKRPMS.fedora,v 1.1 2004/07/12 19:24:49 matthew Exp $
+# $Id: CHECKRPMS.fedora,v 1.2 2004/07/19 21:01:51 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -50,7 +50,6 @@
 
 my $yum = '/usr/bin/yum';
 my $tmpfile = '/tmp/CHECKRPMS.'.$$;
-my $command = 'date>'.$tmpfile.';'.$yum.' check-update '.'>>'.$tmpfile;
 
 #
 # Determine who we email
@@ -60,7 +59,28 @@
 undef(%perlvar);
 
 #
+# Put some nice text in $tmpfile
+my $hostname = `hostname`;
+chomp($hostname);
+open(TMPFILE,">$tmpfile");
+print TMPFILE localtime(time).'    '.$hostname."\n";
+print TMPFILE <<ENDHEADER;
+Your system needs to be updated.  Please execute (as root) 
+
+yum update
+
+to bring it up to date.
+
+This is very important for the security of your server.  The table below
+lists the packages which need to be updated.
+
+ENDHEADER
+
+close(TMPFILE);
+
+#
 # Execute yum command
+my $command = $yum.' check-update '.'>>'.$tmpfile;
 system($command);
 
 my $returnvalue = $?>>8;