summaryrefslogtreecommitdiff
path: root/mac-tap/tuntap/startup_item
diff options
context:
space:
mode:
Diffstat (limited to 'mac-tap/tuntap/startup_item')
-rw-r--r--mac-tap/tuntap/startup_item/tap/Resources/English.lproj/Localizable.strings11
-rw-r--r--mac-tap/tuntap/startup_item/tap/StartupParameters.plist6
-rwxr-xr-xmac-tap/tuntap/startup_item/tap/tap33
-rw-r--r--mac-tap/tuntap/startup_item/tun/Resources/English.lproj/Localizable.strings11
-rw-r--r--mac-tap/tuntap/startup_item/tun/StartupParameters.plist6
-rwxr-xr-xmac-tap/tuntap/startup_item/tun/tun33
6 files changed, 100 insertions, 0 deletions
diff --git a/mac-tap/tuntap/startup_item/tap/Resources/English.lproj/Localizable.strings b/mac-tap/tuntap/startup_item/tap/Resources/English.lproj/Localizable.strings
new file mode 100644
index 00000000..4d3b29ca
--- /dev/null
+++ b/mac-tap/tuntap/startup_item/tap/Resources/English.lproj/Localizable.strings
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>ethertap device kernel extension</key>
+ <string>ethertap kernel extension</string>
+ <key>Initializing tap devices</key>
+ <string>Initializing tap devices</string>
+</dict>
+</plist>
+
diff --git a/mac-tap/tuntap/startup_item/tap/StartupParameters.plist b/mac-tap/tuntap/startup_item/tap/StartupParameters.plist
new file mode 100644
index 00000000..fe9cf001
--- /dev/null
+++ b/mac-tap/tuntap/startup_item/tap/StartupParameters.plist
@@ -0,0 +1,6 @@
+{
+ Description = "ethertap device kernel extension";
+ Provides = ("ethertap");
+ Requires = ("Network Configuration");
+ OrderPreference = "None";
+}
diff --git a/mac-tap/tuntap/startup_item/tap/tap b/mac-tap/tuntap/startup_item/tap/tap
new file mode 100755
index 00000000..d7600991
--- /dev/null
+++ b/mac-tap/tuntap/startup_item/tap/tap
@@ -0,0 +1,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"
diff --git a/mac-tap/tuntap/startup_item/tun/Resources/English.lproj/Localizable.strings b/mac-tap/tuntap/startup_item/tun/Resources/English.lproj/Localizable.strings
new file mode 100644
index 00000000..054790e7
--- /dev/null
+++ b/mac-tap/tuntap/startup_item/tun/Resources/English.lproj/Localizable.strings
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>ip tunnel device kernel extension</key>
+ <string>ip tunnel kernel extension</string>
+ <key>Initializing tun devices</key>
+ <string>Initializing tun devices</string>
+</dict>
+</plist>
+
diff --git a/mac-tap/tuntap/startup_item/tun/StartupParameters.plist b/mac-tap/tuntap/startup_item/tun/StartupParameters.plist
new file mode 100644
index 00000000..71a92626
--- /dev/null
+++ b/mac-tap/tuntap/startup_item/tun/StartupParameters.plist
@@ -0,0 +1,6 @@
+{
+ Description = "ip tunnel device kernel extension";
+ Provides = ("tun");
+ Requires = ("Network Configuration");
+ OrderPreference = "None";
+}
diff --git a/mac-tap/tuntap/startup_item/tun/tun b/mac-tap/tuntap/startup_item/tun/tun
new file mode 100755
index 00000000..40b1b411
--- /dev/null
+++ b/mac-tap/tuntap/startup_item/tun/tun
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+##
+# load the tun kext
+##
+
+. /etc/rc.common
+
+StartService ()
+{
+ ConsoleMessage "Initializing tun devices"
+
+ if [ -d /Library/Extensions/tun.kext ]; then
+ kextload /Library/Extensions/tun.kext
+ fi
+}
+
+StopService ()
+{
+ if [ -d /Library/Extensions/tun.kext ]; then
+ kextunload /Library/Extensions/tun.kext
+ fi
+}
+
+RestartService ()
+{
+ if [ -d /Library/Extensions/tun.kext ]; then
+ kextunload /Library/Extensions/tun.kext
+ kextload /Library/Extensions/tun.kext
+ fi
+}
+
+RunService "$1"