Subject: [LON-CAPA-dev] some more SuSE patches

From: Martin Siegert <[email-masked]>
Date: Mon, 11 Apr 2005 14:19:31 -0700

Hi,

I am attaching tree patches:

- loncapa-1.3.3-ntpcheck.patch
  fixes ntpcheck.piml so that it works under SuSE as well (where ntpd
  quite annoyingly is renamed to xntpd).
- loncapa-1.3.3-splitsize.patch
  this one has annoyed me for quite a while (probably since loncapa-1.2.0):
  All our RH 7.3 boxes send the daily email notifications in several pieces
  (mime type message/partial) requiring an email reader that can reassemble
  the pieces. Since I did not have such an email reader I have deleted these
  daily notifications ever since. My SuSE boxes send the daily notifications
  in one piece but with the wrong mime type of text/plain, which is quite
  annoying as well. The reason is the send_mail routine in loncron:
  it uses metasend unless that fails in which case mail is used. Under
  SuSE I never installed the metamail rpm package, thus mail was used and
  no mime type was set. However, metamail by default uses a ridiculously
  small "slitsize", i.e., even the smallest email messages will be cut into
  bits and pieces. Solution: set the spiltsize explicitly and then add
  "metamail" to the LONCAPA-prerequisites.
- CHECKRPMS.suse
  version that works under suse. I am assuming the /etc/youservers has
  been configured already. I do not know what happens (ar there defaults?)
  if you don't.

Cheers,
Martin
--- loncapa-1.3.2/doc/loncapafiles/ntpcheck.piml.orig	2005-03-22 18:33:46.000000000 -0800
+++ loncapa-1.3.2/doc/loncapafiles/ntpcheck.piml	2005-03-22 19:15:31.000000000 -0800
@@ -37,16 +37,21 @@
 <perlscript mode="fg">
 print "Checking to be sure the Network Time Protocol is running properly.\n";
 print "For more information on ntpd please see http://www.ntp.org/\n";
-if (! -e "/etc/init.d/ntpd") {
+my $NTPD;
+if (-e "/etc/init.d/ntpd") {
+   $NTPD = "ntpd";
+} elsif (-e "/etc/init.d/xntpd") {
+   $NTPD = "xntpd";
+} else {
     print "ntp is not installed.\n";
     exit;
 }
-my $value = `/etc/init.d/ntpd status`;
-if ($value !~ / running/) {
-    print "WARNING: ntp is installed but is not currently running.\nPlease verify the configuration of ntp in /etc/ntp.conf and /etc/ntp/step-tickers\nStart ntp by executing\n /etc/init.d/ntpd start\n";
+my $value = `/etc/init.d/$NTPD status`;
+if ($value !~ /running/) {
+    print "WARNING: ntp is installed but is not currently running.\nPlease verify the configuration of ntp in /etc/ntp.conf and /etc/ntp/step-tickers\nStart ntp by executing\n /etc/init.d/$NTPD start\n";
 }
 # chkconfig barfs to stderr if the target isn't set up right.
-my $restartchk = `/sbin/chkconfig --list ntpd 2>/dev/null`;
+my $restartchk = `/sbin/chkconfig --list $NTPD 2>/dev/null`;
 if ($restartchk eq '') {
     print "**** WARNING: ntpd is either not installed or not configured to run at boot.\n";
     exit;
@@ -57,7 +62,7 @@
     exit;
 }
 if ($restartchk !~ /\s3:on/) {
-    print "**** WARNING: ntpd is not set to start at runlevel 3.  To correct this run:\n/sbin/chkconfig --level 345 ntpd on\n";
+    print "**** WARNING: ntpd is not set to start at runlevel 3.  To correct this run:\n/sbin/chkconfig --level 345 $NTPD on\n";
     exit;
 }
 if ($restartchk !~ /\s5:on/) {
--- loncapa-1.3.3/loncom/loncron.orig	2005-04-11 13:45:23.166250153 -0700
+++ loncapa-1.3.3/loncom/loncron	2005-04-11 13:45:41.854190236 -0700
@@ -559,7 +559,7 @@
     }
     my $subj="LON: $perlvar{'lonHostID'} E:$errors W:$warnings N:$notices"; 
 
-    my $result=system("metasend -b -t $emailto -s '$subj' -f $statusdir/index.html -m text/html >& /dev/null");
+    my $result=system("metasend -b -S 4000000 -t $emailto -s '$subj' -f $statusdir/index.html -m text/html >& /dev/null");
     if ($result != 0) {
 	$result=system("mail -s '$subj' $emailto < $statusdir/index.html");
     }

---

From: Guy Albertelli II <[email-masked]>
Date: Wed, 13 Apr 2005 14:59:37 -0400 (EDT)

Hi Martin,

Thanks!

> - loncapa-1.3.3-ntpcheck.patch

Committed.

> - loncapa-1.3.3-splitsize.patch

Fedora doesn't have metamail anymore. Which why it hadn't been
annoying us. :-)

But still

Committed.

>   been configured already. I do not know what happens (ar there defaults?)

Committed.

I need to work on the install/tarfile build to make sure these get
properly included and installed on SuSE
(bug 4062)
-- 
[email-masked]  LON-CAPA Developer  0-7-2-9-