aboutsummaryrefslogtreecommitdiffstats
path: root/security/rng_82802/pkg-install
blob: 284eddfb2866e30e3980bf9151e7718954700cb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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