#!/bin/sh
# CHECK-INSTALL

. ./funcs.sh

case $OS in
OpenBSD|NetBSD|FreeBSD)
	has_or_fail vnconfig
	;;
Linux)
	has /sbin/udevadm && \
		udevver=`/sbin/udevadm info -V | awk '{print $NF}'`
	[ -z "$udevver" ] && has_or_fail udevinfo && \
		udevver=`udevinfo -V | awk '{print $NF}'`
	[ "$udevver" -ge 59 ] 2>/dev/null || \
		has hotplug || \
		fail "udev is too old, upgrade to version 59 or later"
	;;
*)
	fail "unknown OS"
	;;
esac
