aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/xntpd/refclocks/rclk.MOTO
blob: d6e11f8e01934df12c59a4fce35e7d10d863b133 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh -
CMD="$1"
shift;

. refclocks/setup

case "$CMD" in
  info)
	echo "	MOTO		- Motorola GPS clock"
	;;
  check)
	if check "$RCONFIG" '$0 ~ /MOTO/'; then
	  echo "MOTO		- Motorola GPS clock"
	fi
	;;
  config)
	if check "$REFCONF" '$0 ~ /MOTO/' ||
	   ( [ ! "$REFCONF" ] && query "Include Motorola clock (MOTO)" n); then
          if check "$PPSFEATURES" '$0 ~ /CD/' &&
	     [ "$PPSOK" -eq 1 ] &&
	     (check "$REFCONF" '$0 ~ /MOTOPPS/' ||
	     ( [ ! "$REFCONF" ] && query "	Use Motorola for PPS" n)); then
		echo "-DMOTOPPS" >> $RCONFIG
          else
	    echo "-DMOTO" >> $RCONFIG
          fi
	fi
	;;
esac