summaryrefslogtreecommitdiff
path: root/mac-tap/tuntap/startup_item/tun
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-04 16:56:19 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-04 16:56:19 -0400
commit150850b80012f852521c9935145cf966946334d5 (patch)
treec082369f2fef2515cfa2e4acf1b83250a3963158 /mac-tap/tuntap/startup_item/tun
downloadinfinitytier-150850b80012f852521c9935145cf966946334d5.tar.gz
infinitytier-150850b80012f852521c9935145cf966946334d5.zip
New git repository for release - version 0.2.0 tagged
Diffstat (limited to 'mac-tap/tuntap/startup_item/tun')
-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
3 files changed, 50 insertions, 0 deletions
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"