freebsd-dev/usr.sbin/xntpd/refclocks/rclk.PST
1993-12-21 18:36:48 +00:00

38 lines
881 B
Bash

#!/bin/sh -
CMD="$1"
shift;
. refclocks/setup
case "$CMD" in
info)
echo " PST - PST/Traconex 1020 WWV/H receiver"
;;
check)
if check "$RCONFIG" '$0 ~ /PST/'; then
echo "PST - PST/Traconex 1020 WWV/H receiver"
fi
;;
config)
if check "$REFCONF" '$0 ~ /PST/' ||
( [ ! "$REFCONF" ] && query "Include PST/Traconex 1020 WWV/H receiver (PST)" n); then
_PST=0
if check "$PPSFEATURES" '$0 ~ /CLK/'; then
if (check "$REFCONF" '$0 ~ /PSTCLK/' ||
( [ ! "$REFCONF" ] && query " Support PPS via clk" y)); then
echo " -DPSTCLK" >> $RCONFIG
_PST=1
fi
fi
if check "$PPSFEATURES" '$0 ~ /CD/' &&
[ "$PPSOK" -eq 1 ] &&
(check "$REFCONF" '$0 ~ /PSTPPS/' ||
( [ ! "$REFCONF" ] && query " Use PST for PPS" n)); then
echo " -DPSTPPS" >> $RCONFIG
else
[ "$_PST" -eq 0 ] && echo "-DPST" >> $RCONFIG
fi
fi
;;
esac