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:44] 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"?> 
 +<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
 +  <plist version="1.0"> 
 +    <dict> 
 +      <key>Label</key> 
 +        <string>static.route</string> 
 +      <key>ProgramArguments</key> 
 +        <array> 
 +          <string>route</string> 
 +          <string>add</string> 
 +          <string>-net</string> 
 +          <string>192.168.0.0/24</string> 
 +          <string>192.168.24.161</string> 
 +        </array> 
 +      <key>RunAtLoad</key> 
 +        <true /> 
 +      <key>ServiceIPC</key> 
 +        <false /> 
 +    </dict> 
 +  </plist> 
 +</code> 
 +==== .plist laden ====
  
-  mkdir AddRoutes +  sudo launchctl load -w /Library/LaunchDaemons/static.route.plist
-  cd AddRoutes+
  
-AddRoutes Datei  +==== Neustart ... ====
- +
-  nano -w AddRoutes +
- +
-erstellen mit folgendem Inhalt +
- +
-#!/bin/sh +
- +
-# Set static routing tables +
- +
-. /etc/rc.common +
- +
-StartService () +
-+
-if [ "${ADDROUTES:=-NO-}" "-YES-" ]; then +
- 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"+
  
 +Mac neustarten und danach etwas Geduld, es hat bei mir ca. eine Minute gedauert bis die Route eingetragen war.
  
os_x.1392108268.txt.gz · Last modified: 2014/02/11 09:44 by admin