#!/bin/sh
# $Id: traceroute.control,v 1.2 2001/03/08 16:42:18 solar Exp $

. /etc/control.d/functions

BINARY_TR=/usr/sbin/traceroute
BINARY_TR6=/usr/sbin/traceroute6

new_fmode public 4555 root wheel
new_fmode wheelonly 4550 root wheel
new_fmode restricted 700 root wheel

case "$*" in
list)
	echo "$NAME_LIST"
	;;
status|'')
	STATUS_TR="`control_fmode "$BINARY_TR" status`" || exit 1
	STATUS_TR6="`control_fmode "$BINARY_TR6" status`" || exit 1
	if [ -n "$STATUS_TR" -a "$STATUS_TR" = "$STATUS_TR6" ]; then
		echo "$STATUS_TR"
	else
		echo "unknown"
	fi
	;;
*)
	control_fmode "$BINARY_TR" "$*" || exit 1
	control_fmode "$BINARY_TR6" "$*" || exit 1
	;;
esac

