[LON-CAPA-cvs] cvs: doc /loncapafiles ntpcheck.piml

raeburn raeburn at source.lon-capa.org
Sun May 22 19:15:28 EDT 2016


raeburn		Sun May 22 23:15:28 2016 EDT

  Modified files:              
    /doc/loncapafiles	ntpcheck.piml 
  Log:
  - Improve command used to check that ntp is running.
  - Print message if running.
  
  
Index: doc/loncapafiles/ntpcheck.piml
diff -u doc/loncapafiles/ntpcheck.piml:1.26 doc/loncapafiles/ntpcheck.piml:1.27
--- doc/loncapafiles/ntpcheck.piml:1.26	Sat Apr  9 19:04:39 2016
+++ doc/loncapafiles/ntpcheck.piml	Sun May 22 23:15:28 2016
@@ -3,7 +3,7 @@
 <!-- ntpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: ntpcheck.piml,v 1.26 2016/04/09 19:04:39 raeburn Exp $ -->
+<!-- $Id: ntpcheck.piml,v 1.27 2016/05/22 23:15:28 raeburn Exp $ -->
 
 <!--
 
@@ -38,7 +38,7 @@
 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";
 my $NTPD;
-my $checkcmd = 'ps -ef |grep ntp |grep -v grep';
+my $checkcmd = 'ps -ef |grep ntp |grep -v grep |grep -v ntpcheck';
 my $startntpcmd;
 my $is_running;
 if (('<DIST />' eq 'fedora15') || ('<DIST />' eq 'fedora16')    ||
@@ -73,6 +73,8 @@
     close(PIPE);
     if (!$is_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 $startntpcmd\n";
+    } else {
+        print "ntp is installed and running\n";
     }
 } else {
     print "Could not determine ntp status.\n";




More information about the LON-CAPA-cvs mailing list