User Tools

Site Tools


os_x

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
os_x [2014/02/11 09:46] adminos_x [2015/10/30 10:19] (current) – [.plist Datei anlegen] admin
Line 131: Line 131:
  
  
-===== Router dauerhaft hinzufügen =====+===== Route dauerhaft hinzufügen =====
  
-Im Terminal das Verzeichnis öffnen:+==== .plist Datei anlegen ====
  
-  cd /System/Library/StartupItems+In **/Library/LaunchDaemons** die Datei **static.route.plist** anlegen und folgendes eintragen:
  
-Ordner AddRoutes erstellen und öffnen: +<code xml
- +<?xml version="1.0" encoding="UTF-8"?> 
-  mkdir AddRoutes +<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN"http://www.apple.com/DTDs/PropertyList-1.0.dtd"
-  cd AddRoutes +  <plist version="1.0"> 
- +    <dict> 
-AddRoutes Datei  +      <key>Label</key> 
- +        <string>static.route</string> 
-  nano -w AddRoutes +      <key>ProgramArguments</key> 
- +        <array> 
-erstellen mit folgendem Inhalt +          <string>route</string> 
- +          <string>add</string> 
-<code> +          <string>-net</string> 
-#!/bin/sh +          <string>192.168.0.0/24</string> 
- +          <string>192.168.24.161</string> 
-# Set static routing tables +        </array> 
- +      <key>RunAtLoad</key> 
-. /etc/rc.common +        <true /> 
- +      <key>ServiceIPC</key> 
-StartService () +        <false /> 
-+    </dict> 
-if [ "${ADDROUTES:=-NO-}" = "-YES-]; then +  </plist>
- ConsoleMessage "Adding Static Routing Table" +
- sudo route -nv add 192.168.11.0 192.168.12.254 +
-fi +
-} +
- +
-StopService () +
-{ +
-return 0 +
-+
- +
-StopService () +
-+
-return 0 +
-+
- +
-RestartService () +
-+
-return 0 +
-+
- +
-RunService "$1"+
 </code> </code>
 +==== .plist laden ====
  
-*.plist file erstellen:+  sudo launchctl load -w /Library/LaunchDaemons/static.route.plist
  
-  nano -w StartupParameters.plist +==== Neustart ... ====
-   +
-und folgenden Inhalt einfügen+
  
-<code> +Mac neustarten und danach etwas Geduld, es hat bei mir ca. eine Minute gedauert bis die Route eingetragen war.
-+
- Description = "Add static routing tables"; +
- Provides = ("AddRoutes"); +
- Requires = ("Network"); +
- OrderPreference = "None"; +
-+
-</code>+
  
-Überprüfung mit "netstat -nr" 
os_x.1392108416.txt.gz · Last modified: 2014/02/11 09:46 by admin