[LON-CAPA-cvs] cvs: loncom / loncron lond lonmaxima lonr lonsql

raeburn raeburn at source.lon-capa.org
Sun Oct 28 22:57:30 EDT 2018


raeburn		Mon Oct 29 02:57:30 2018 EDT

  Modified files:              
    /loncom	lond lonmaxima lonr lonsql loncron 
  Log:
  - Replace use of mailto (metamail package) with mail command.
    metamail was in Red Hat 7.3, but is absent from Fedora, CentOS, RHEL etc.
  
  
Index: loncom/lond
diff -u loncom/lond:1.549 loncom/lond:1.550
--- loncom/lond:1.549	Mon Aug 20 22:42:05 2018
+++ loncom/lond	Mon Oct 29 02:57:30 2018
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.549 2018/08/20 22:42:05 raeburn Exp $
+# $Id: lond,v 1.550 2018/10/29 02:57:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,7 +65,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.549 $'; #' stupid emacs
+my $VERSION='$Revision: 1.550 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -6910,8 +6910,8 @@
 if ($wwwid!=$<) {
    my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
    my $subj="LON: $currenthostid User ID mismatch";
-   system("echo 'User ID mismatch.  lond must be run as user www.' |\
- mailto $emailto -s '$subj' > /dev/null");
+   system("echo 'User ID mismatch.  lond must be run as user www.' |".
+          " mail -s '$subj' $emailto > /dev/null");
    exit 1;
 }
 
Index: loncom/lonmaxima
diff -u loncom/lonmaxima:1.42 loncom/lonmaxima:1.43
--- loncom/lonmaxima:1.42	Thu Jul  4 11:44:44 2013
+++ loncom/lonmaxima	Mon Oct 29 02:57:30 2018
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Connect to MAXIMA CAS
 #
-# $Id: lonmaxima,v 1.42 2013/07/04 11:44:44 droeschl Exp $
+# $Id: lonmaxima,v 1.43 2018/10/29 02:57:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -156,8 +156,8 @@
 if ($wwwid!=$<) {
     my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
     my $subj="LON: User ID mismatch";
-    system("echo 'User ID mismatch.  lonmaxima must be run as user www.' |\
- mailto $emailto -s '$subj' > /dev/null");
+    system("echo 'User ID mismatch.  lonmaxima must be run as user www.' |".
+           " mailto -s '$subj' $emailto > /dev/null");
     exit 1;
 }
  
Index: loncom/lonr
diff -u loncom/lonr:1.11 loncom/lonr:1.12
--- loncom/lonr:1.11	Sun Nov 16 17:41:53 2014
+++ loncom/lonr	Mon Oct 29 02:57:30 2018
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Connect to R CAS
 #
-# $Id: lonr,v 1.11 2014/11/16 17:41:53 raeburn Exp $
+# $Id: lonr,v 1.12 2018/10/29 02:57:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -156,8 +156,8 @@
 if ($wwwid!=$<) {
     my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
     my $subj="LON: User ID mismatch";
-    system("echo 'User ID mismatch.  lonr must be run as user www.' |\
- mailto $emailto -s '$subj' > /dev/null");
+    system("echo 'User ID mismatch.  lonr must be run as user www.' |".
+           " mailto -s '$subj' $emailto > /dev/null");
     exit 1;
 }
  
Index: loncom/lonsql
diff -u loncom/lonsql:1.96 loncom/lonsql:1.97
--- loncom/lonsql:1.96	Fri Oct 13 20:37:46 2017
+++ loncom/lonsql	Mon Oct 29 02:57:30 2018
@@ -3,7 +3,7 @@
 # The LearningOnline Network
 # lonsql - LON TCP-MySQL-Server Daemon for handling database requests.
 #
-# $Id: lonsql,v 1.96 2017/10/13 20:37:46 raeburn Exp $
+# $Id: lonsql,v 1.97 2018/10/29 02:57:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -231,7 +231,7 @@
     my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
     my $subj="LON: $perlvar{'lonHostID'} Cannot connect to database!";
     system("echo 'Cannot connect to MySQL database!' |".
-           " mailto $emailto -s '$subj' > /dev/null");
+           " mail -s '$subj' $emailto > /dev/null");
 
     open(SMP,">$perlvar{'lonDocRoot'}/lon-status/mysql.txt");
     print SMP 'time='.time.'&mysql=defunct'."\n";
Index: loncom/loncron
diff -u loncom/loncron:1.111 loncom/loncron:1.112
--- loncom/loncron:1.111	Mon Oct 29 02:46:41 2018
+++ loncom/loncron	Mon Oct 29 02:57:30 2018
@@ -2,7 +2,7 @@
 
 # Housekeeping program, started by cron, loncontrol and loncron.pl
 #
-# $Id: loncron,v 1.111 2018/10/29 02:46:41 raeburn Exp $
+# $Id: loncron,v 1.112 2018/10/29 02:57:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1176,8 +1176,8 @@
 	chop $hostname;
 	$hostname=~s/[^\w\.]//g; # make sure is safe to pass through shell
 	my $subj="LON: Unconfigured machine $hostname";
-	system("echo 'Unconfigured machine $hostname.' |\
-               mail -s '$subj' $emailto > /dev/null");
+	system("echo 'Unconfigured machine $hostname.' |".
+               " mail -s '$subj' $emailto > /dev/null");
 	exit 1;
     }
 
@@ -1187,8 +1187,8 @@
 	print("User ID mismatch. This program must be run as user 'www'.\n");
 	my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
 	my $subj="LON: $perlvar{'lonHostID'} User ID mismatch";
-	system("echo 'User ID mismatch. loncron must be run as user www.' |\
-               mail -s '$subj' $emailto > /dev/null");
+	system("echo 'User ID mismatch. loncron must be run as user www.' |".
+               " mail -s '$subj' $emailto > /dev/null");
 	exit 1;
     }
 




More information about the LON-CAPA-cvs mailing list