initial import (Boeing r1752, NRL r878)
This commit is contained in:
commit
f8f46d28be
394 changed files with 99738 additions and 0 deletions
26
scripts/perf/timesyncstart.sh
Normal file
26
scripts/perf/timesyncstart.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
# (c)2010-2012 the Boeing Company
|
||||
# author: Yueli Yang <yueli.yang@boeing.com>
|
||||
#
|
||||
# start time sync with ntpd if it is installed but not started
|
||||
#
|
||||
# Usage: sudo timesyncstart.sh [debug]
|
||||
|
||||
dbg=$1
|
||||
if [ "$dbg" = "debug" ]; then
|
||||
date +%y%h%d-%T-%N
|
||||
fi
|
||||
if [ -e /usr/sbin/ntpd ]; then
|
||||
/etc/init.d/ntp status
|
||||
if [ $? = 3 ]; then
|
||||
/etc/init.d/ntp start
|
||||
if [ "$dbg" = "debug" ]; then
|
||||
echo "start ntpd process"
|
||||
ntptime
|
||||
ntpq -c peers
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$dbg" = "debug" ]; then
|
||||
date +%y%h%d-%T-%N
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue