#!/bin/sh

# The 'input' group is not registered in the ports tree's GIDs, so the
# GROUPS framework cannot create it.  Mirror what upstream's own FreeBSD
# package does in its +POST_INSTALL script.

if [ "$2" = "POST-INSTALL" ]; then
	if ! /usr/sbin/pw groupshow input >/dev/null 2>&1; then
		echo "Creating 'input' group for virtual input devices..."
		/usr/sbin/pw groupadd input
	fi
fi
