version 1.26, 2016/04/09 19:04:39
|
version 1.27, 2016/05/22 23:15:28
|
Line 38 http://www.lon-capa.org/
|
Line 38 http://www.lon-capa.org/
|
print "Checking to be sure the Network Time Protocol is running properly.\n"; |
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"; |
print "For more information on ntpd please see http://www.ntp.org/\n"; |
my $NTPD; |
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 $startntpcmd; |
my $is_running; |
my $is_running; |
if (('<DIST />' eq 'fedora15') || ('<DIST />' eq 'fedora16') || |
if (('<DIST />' eq 'fedora15') || ('<DIST />' eq 'fedora16') || |
Line 73 if (open(PIPE,'-|',$checkcmd)) {
|
Line 73 if (open(PIPE,'-|',$checkcmd)) {
|
close(PIPE); |
close(PIPE); |
if (!$is_running) { |
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"; |
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 { |
} else { |
print "Could not determine ntp status.\n"; |
print "Could not determine ntp status.\n"; |