summaryrefslogtreecommitdiff
path: root/tap-mac/tuntap/startup_item/tap/tap
blob: d7600991f940c9420350f8ca003c739ba3e29b96 (plain)
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
26
27
28
29
30
31
32
33
#!/bin/sh

##
# load the tap kext
##

. /etc/rc.common

StartService ()
{
	ConsoleMessage "Initializing tap devices"

	if [ -d /Library/Extensions/tap.kext ]; then
		kextload /Library/Extensions/tap.kext
	fi
}

StopService ()
{
	if [ -d /Library/Extensions/tap.kext ]; then
		kextunload /Library/Extensions/tap.kext
	fi
}

RestartService ()
{
	if [ -d /Library/Extensions/tap.kext ]; then
		kextunload /Library/Extensions/tap.kext
		kextload /Library/Extensions/tap.kext
	fi
}

RunService "$1"