|
|
@ -27,25 +27,22 @@ else |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# clock_pick function: |
|
|
|
# clock_pick function: |
|
|
|
clock_pick() |
|
|
|
clock_pick() { |
|
|
|
{ |
|
|
|
case "${CLOCK_TYPE}" in |
|
|
|
case ${CLOCK_TYPE} in |
|
|
|
ntp|NTP) D_bindir/sntpclock "${CLOCK_IP}" |
|
|
|
ntp|NTP) |
|
|
|
|
|
|
|
D_bindir/sntpclock "${CLOCK_IP}" |
|
|
|
|
|
|
|
;; |
|
|
|
;; |
|
|
|
tai|TAI) |
|
|
|
tai|TAI) D_bindir/taiclock "${CLOCK_IP}" |
|
|
|
D_bindir/taiclock "${CLOCK_IP}" |
|
|
|
|
|
|
|
;; |
|
|
|
;; |
|
|
|
*) |
|
|
|
*) |
|
|
|
echo "$0: configuration error: CLOCK_TYPE not recognized" |
|
|
|
echo "$0: configuration error: CLOCK_TYPE not recognized" |
|
|
|
exit 1; |
|
|
|
exit 1 |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# process command: |
|
|
|
# process command: |
|
|
|
case $1 in |
|
|
|
case "$1" in |
|
|
|
a|atto) |
|
|
|
a|atto) |
|
|
|
echo "Viewing current attoseconds in hardware tick:" |
|
|
|
echo "Viewing current attoseconds in hardware tick:" |
|
|
|
D_bindir/clockview < /var/state/clockspeed/atto |
|
|
|
D_bindir/clockview < /var/state/clockspeed/atto |
|
|
@ -64,21 +61,20 @@ v|view) |
|
|
|
clock_pick | D_bindir/clockview |
|
|
|
clock_pick | D_bindir/clockview |
|
|
|
;; |
|
|
|
;; |
|
|
|
h|help) |
|
|
|
h|help) |
|
|
|
cat <<END_HELP |
|
|
|
cat <<-EOT |
|
|
|
clockspeed control: |
|
|
|
clockspeed control: |
|
|
|
atto -- inspect current "attoseconds" |
|
|
|
atto -- inspect current "attoseconds" |
|
|
|
mark -- obtain new calibration mark for clockspeed |
|
|
|
mark -- obtain new calibration mark for clockspeed |
|
|
|
sync -- set the system clock with master time server |
|
|
|
sync -- set the system clock with master time server |
|
|
|
view -- check system clock against master time server |
|
|
|
view -- check system clock against master time server |
|
|
|
help -- this screen |
|
|
|
help -- this screen |
|
|
|
END_HELP |
|
|
|
EOT |
|
|
|
|
|
|
|
exit 0 |
|
|
|
;; |
|
|
|
;; |
|
|
|
|
|
|
|
|
|
|
|
*) |
|
|
|
*) |
|
|
|
echo "Usage: $0 [ a|atto | m|mark | s|sync | v|view | h|help ]" |
|
|
|
echo "Usage: $0 [ a|atto | m|mark | s|sync | v|view | h|help ]" |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
exit 0 |
|
|
|
|
|
|
|
### that's all, folks! |
|
|
|
### that's all, folks! |
|
|
|