aboutsummaryrefslogtreecommitdiff
path: root/sysutils/pcfclock/pkg-install
blob: 45607a18599467494d79596647da1ca5ce433537 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

case $2 in
    POST-INSTALL)
    if [ ! -c /dev/pcfclock0 ]; then
	if [ -x /dev/MAKEDEV ]; then
	    # FreeBSD 4.x
	    ( cd /dev && ./MAKEDEV pcfclock0 )
	    rv=$?

	    if [ ${rv} = 0 ]; then
		echo "$2: Device special file /dev/pcfclock0 created"
	    else
		echo "$2: Unexpected failure creating /dev/pcfclock0"
		echo "$2: Try 'cd /dev ; mknod pcfclock0 c 140 0 root:wheel'"
	    fi
	else
	    # FreeBSD 5.x or later
	    echo "$2: No pcfclock device found"
	    echo "$2: Ensure to have pcfclock support enabled for your kernel"
	fi
    fi

    ;;
esac