21 lines
393 B
Bash
21 lines
393 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/sbin:/usr/bin
|
|
|
|
case $2 in
|
|
POST-INSTALL)
|
|
if [ `id -u` -ne 0 ]; then
|
|
echo "You must be root to install this port!";
|
|
exit 1
|
|
fi
|
|
[ -c /dev/rng ] || mknod /dev/rng c 229 0
|
|
;;
|
|
POST-DEINSTALL)
|
|
if kldstat -n rng >/dev/null 2>&1; then
|
|
echo "Please, manually unload rng kernel module"
|
|
exit 1
|
|
# kldunload rng
|
|
fi
|
|
echo; echo "Please, manually remove /dev/rng"
|
|
;;
|
|
esac
|