![Permanente statische Routen schlagen beim Start von MacOS 10.6.5 fehl!](https://rvso.com/image/1259382/Permanente%20statische%20Routen%20schlagen%20beim%20Start%20von%20MacOS%2010.6.5%20fehl!.png)
Ich kann keine statischen Routen erhalten, die einen Neustart unter Mac OS 10.6.5 beibehalten. Ich habe alle in den Google-Suchergebnissen und früheren Beiträgen auf dieser Site beschriebenen Methoden ausprobiert. Ich habe versucht, manuell einen Launchd-Daemon zu erstellen, und habe den Launchd-Daemon von RouteSplit ohne Erfolg verwendet. Es ist klar, dass die Schnittstelle nicht bereit ist, wenn diese Methoden versuchen, die Route anzuwenden. Diese betreffende Arbeitsstation erhält ihre IP von DHCP und hat wahrscheinlich ihre DHCP-Lease nicht erhalten, wenn der Befehl ausgeführt wird. Wir können die Route manuell anwenden, wenn wir angemeldet sind, aber nicht über Startmethoden. Gibt es eine andere Möglichkeit, diese Route anzuwenden, indem man den Befehl später, aber bevor das Anmeldefenster für den Benutzer angezeigt wird, in etwas einschmuggelt?
Hier sind einige relevante Protokollinformationen aus system.log. Sie können die Fehler „Route: Schreiben in Routing-Socket: Netzwerk ist nicht erreichbar“ sehen, wo mein Launchd-Skript ausgelöst wird. Ich habe versucht, später im Skript zusätzliche „sleep“- und „ipconfig waitall“-Anweisungen hinzuzufügen, aber das funktioniert nicht.
Dec 15 19:30:41 localhost com.apple.launchd[1]: *** launchd[1] has started up. ***
Dec 15 19:30:45 localhost mDNSResponder[18]: mDNSResponder mDNSResponder-258.13 (Oct 8 2010 17:10:30) starting
Dec 15 19:30:47 localhost configd[15]: bootp_session_transmit: bpf_write(en1) failed: Network is down (50)
Dec 15 19:30:47 localhost configd[15]: DHCP en1: INIT transmit failed
Dec 15 19:30:47 localhost configd[15]: network configuration changed.
Dec 15 19:30:47 Administrators-MacBook-Pro configd[15]: setting hostname to "Administrators-MacBook-Pro.local"
Dec 15 19:30:47 Administrators-MacBook-Pro blued[16]: Apple Bluetooth daemon started
Dec 15 19:30:52 Administrators-MacBook-Pro syslog[67]: routes.sh: Starting RouteSplit
Dec 15 19:30:53 Administrators-MacBook-Pro com.apple.usbmuxd[41]: usbmuxd-207 built for iTunesTenOne on Oct 19 2010 at 13:50:35, running 64 bit
Dec 15 19:30:54 Administrators-MacBook-Pro /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[50]: Login Window Application Started
Dec 15 19:30:55 Administrators-MacBook-Pro bootlog[61]: BOOT_TIME: 1292459441 0
Dec 15 19:30:55 Administrators-MacBook-Pro syslog[86]: routes.sh: static route 192.168.0.0/23 192.168.2.2
Dec 15 19:30:55 Administrators-MacBook-Pro net.routes.static[65]: route: writing to routing socket: Network is unreachable
Dec 15 19:30:55 Administrators-MacBook-Pro net.routes.static[65]: add net 192.168.0.0: gateway 192.168.2.2: Network is unreachable
Dec 15 19:30:57 Administrators-MacBook-Pro org.apache.httpd[38]: httpd: Could not reliably determine the server's fully qualified domain name, using Administrators-MacBook-Pro.local for ServerName
Dec 15 19:30:58 Administrators-MacBook-Pro loginwindow[50]: Login Window Started Security Agent
Dec 15 19:30:58 Administrators-MacBook-Pro WindowServer[89]: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Dec 15 19:30:58 Administrators-MacBook-Pro com.apple.WindowServer[89]: Wed Dec 15 19:30:58 Administrators-MacBook-Pro.local WindowServer[89] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Dec 15 19:31:18 Administrators-MacBook-Pro configd[15]: network configuration changed.
Dec 15 19:31:19 administrators-macbook-pro configd[15]: setting hostname to "administrators-macbook-pro.local"
Dec 15 19:31:25 administrators-macbook-pro _mdnsresponder[121]: /usr/libexec/ntpd-wrapper: scutil key State:/Network/Global/DNS not present after 30 seconds
Dec 15 19:31:25 administrators-macbook-pro _mdnsresponder[124]: sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
Dec 15 19:31:25 administrators-macbook-pro _mdnsresponder[124]: d=15 c=5 x=0 op=1 l=/var/run/sntp.pid f= time.apple.com
Dec 15 19:31:25 administrators-macbook-pro _mdnsresponder[124]: sntp: getaddrinfo(hostname, ntp) failed with nodename nor servname provided, or not known
Dec 15 19:31:27 administrators-macbook-pro configd[15]: network configuration changed.
Dec 15 19:31:27 Administrators-MacBook-Pro configd[15]: setting hostname to "Administrators-MacBook-Pro.local"
Dec 15 19:31:27 Administrators-MacBook-Pro ntpd[37]: Cannot find existing interface for address 17.151.16.20
Dec 15 19:31:27 Administrators-MacBook-Pro ntpd_initres[125]: ntpd indicates no data available!
Dec 15 19:31:31 Administrators-MacBook-Pro sshd[128]: USER_PROCESS: 133 ttys000
Dec 15 19:31:37 Administrators-MacBook-Pro sudo[138]: administrator : TTY=ttys000 ; PWD=/Users/administrator ; USER=root ; COMMAND=/usr/bin/less /var/log/system.log
``Sie können die folgende Zeile in /var/log/kernel.log sehen, die das Aufrufen der en0-Schnittstelle anzeigt:
Dec 15 19:30:51 Administrators-MacBook-Pro kernel[0]: Ethernet [AppleBCM5701Ethernet]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control, Debug [796d,0f01,0de1,0300,c1e1,3800]
Antwort1
Stellen Sie Ihre Launchd-Plist so ein, dass sie durch den Schlüssel „WatchPath“ ausgelöst wird, der auf zeigt /Library/Preferences/SystemConfiguration
. Ich glaube, diese Datei ändert sich, wenn eine neue IP zugewiesen wird. Nicht beim Systemstart zu starten, sondern jedes Mal, wenn sich die IP-Konfiguration ändert, hat den zusätzlichen Vorteil, dass Sie basierend auf Ihrem Subnetz entscheiden können, ob eine Aufteilung erfolgen soll oder nicht.